• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CustomList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CustomList的典型用法代码示例。如果您正苦于以下问题:C# CustomList类的具体用法?C# CustomList怎么用?C# CustomList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CustomList类属于命名空间,在下文中一共展示了CustomList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SaveUnitSetup

        public void SaveUnitSetup(ref CustomList<ItemSubGroup> lstItemSubGroup)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                conManager.BeginTransaction();

                ReSetSPName(lstItemSubGroup);

                blnTranStarted = true;

                conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstItemSubGroup);

                lstItemSubGroup.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:34,代码来源:ItemSubGroupManager.cs


示例2: Main

        static void Main()
        {
            try
            {
                CustomList<int> list = new CustomList<int>();

                list.AddElement(1);
                list.AddElement(2);
                list.AddElement(3);
                list.AddElement(4);
                list.AddElement(5);
                list.AddElement(6);
                list.AddElement(6);
                list.AddElement(6);
                list.AddElement(6);
                list.AddElement(6);
                list.AddElement(6);
                list.AddElement(15);
                list.AddElement(6);
                list.AddElement(6);
                list.AddElement(6);
                list.AddElement(6);
                list.AddElement(6);
                //list.AddElement(6);

                Console.WriteLine(list.Min());
                Console.WriteLine(list.Max());
                Console.WriteLine(list.IndexOf(15));
            }
            catch (InvalidOperationException ioe)
            {

                Console.WriteLine(ioe.Message);
            }
        }
开发者ID:vangelov-i,项目名称:Fundamentals,代码行数:35,代码来源:TestCustomList.cs


示例3: SaveCmnDocListTableMapping

        public void SaveCmnDocListTableMapping(ref CustomList<CmnDocListTableMapping> CmnDocListTableMappingList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                conManager.BeginTransaction();

                ReSetSPName(CmnDocListTableMappingList);
                Int64 TransactionTypeKey = CmnDocListTableMappingList[0].DocListTableMappingID;
                blnTranStarted = true;
                if (CmnDocListTableMappingList[0].IsAdded)
                    TransactionTypeKey = Convert.ToInt64(conManager.InsertData(blnTranStarted, CmnDocListTableMappingList));
                else
                    conManager.SaveDataCollectionThroughCollection(blnTranStarted, CmnDocListTableMappingList);

                CmnDocListTableMappingList.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:35,代码来源:MenuWiseTableMappingManager.cs


示例4: SaveBankReconciliation

        public void SaveBankReconciliation(ref CustomList<Acc_Voucher> VoucherList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                conManager.BeginTransaction();
                VoucherList.UpdateSpName = "spUpdateAcc_VoucherBankReconciliation";
                blnTranStarted = true;

                conManager.SaveDataCollectionThroughCollection(blnTranStarted, VoucherList);

                VoucherList.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:31,代码来源:BankReconciliationManager.cs


示例5: Update

        public void Update(CustomList<BaseItem> itemList, Util.OperationType operationType)
        {
            String spName = String.Empty;

            switch (operationType)
            {
                case Util.OperationType.Insert:
                    spName = itemList.InsertSpName;
                    break;

                case Util.OperationType.Update:
                    spName = itemList.UpdateSpName;
                    break;

                case Util.OperationType.Delete:
                    spName = itemList.DeleteSpName;
                    break;
            }

            Object[] parameterValues = null;
            foreach (BaseItem item in itemList)
            {
                parameterValues = item.GetParameterValues();

                if (parameterValues.IsNotNull())
                {
                    DataAccessHelper.ExecuteNonQueryProcedure(transaction, spName, parameterValues);
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:30,代码来源:CommandExecutor.cs


示例6: GetAllConfiguration

 public static CustomList<Configuration> GetAllConfiguration()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
     CustomList<Configuration> ConfigurationCollection = new CustomList<Configuration>();
     const String sql = "Select *from tblConfiguration";
     IDataReader reader = null; ;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             Configuration newConfiguration = new Configuration();
             newConfiguration.SetData(reader);
             ConfigurationCollection.Add(newConfiguration);
         }
         reader.Close();
         ConfigurationCollection.SelectSpName = "spSelectConfiguration";
         ConfigurationCollection.InsertSpName = "spInsertConfiguration";
         ConfigurationCollection.UpdateSpName = "spUpdateConfiguration";
         ConfigurationCollection.SelectSpName = "spDeleteConfiguration";
         return ConfigurationCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:32,代码来源:Configuration.cs


示例7: GetAllUserGroupWithUserCode

 public static CustomList<UserGroupList> GetAllUserGroupWithUserCode(string userCode)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
     CustomList<UserGroupList> UserGroupListCollection = new CustomList<UserGroupList>();
     String sql = "Exec spUserGroupList'" + userCode + "'";
     IDataReader reader = null;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             UserGroupList newUserGroup = new UserGroupList();
             newUserGroup.SetData(reader);
             UserGroupListCollection.Add(newUserGroup);
         }
         reader.Close();
         return UserGroupListCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:28,代码来源:UserGroupList.cs


示例8: DeleteTempData

        public void DeleteTempData(ref CustomList<GroupRule> lstGroupSecurityRule)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
            Boolean blnTranStarted = false;

            try
            {
                ReSetTempTransactionDeleteSPName(ref lstGroupSecurityRule);
                conManager.BeginTransaction();
                blnTranStarted = true;
                conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstGroupSecurityRule);

                lstGroupSecurityRule.AcceptChanges();
                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception ex)
            {
                conManager.RollBack();
                throw (ex);
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:30,代码来源:GroupInformationManager.cs


示例9: DeleteVoucher

        public void DeleteVoucher(ref CustomList<Acc_VoucherDet> VoucherDetList, ref CustomList<Acc_Voucher> VoucherList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                ReSetSPName(ref VoucherList, ref VoucherDetList);

                conManager.BeginTransaction();
                blnTranStarted = true;
                conManager.SaveDataCollectionThroughCollection(blnTranStarted, VoucherDetList, VoucherList);
                conManager.CommitTransaction();
                VoucherDetList.AcceptChanges();
                VoucherList.AcceptChanges();
            }
            catch (Exception ex)
            {
                conManager.RollBack();
                throw (ex);
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    blnTranStarted = false;
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:30,代码来源:VoucherManager.cs


示例10: SaveFiscalYear

        public void SaveFiscalYear(ref CustomList<Gen_FY> Gen_FYList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                conManager.BeginTransaction();

                ReSetSPName(Gen_FYList);

                blnTranStarted = true;

                conManager.SaveDataCollectionThroughCollection(blnTranStarted, Gen_FYList);
                //object scope_Identity = conManager.InsertData(blnTranStarted, BankKist);

                Gen_FYList.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:35,代码来源:FiscalYearManager.cs


示例11: GetAllHousekeepingHierarchy

 public static CustomList<HousekeepingHierarchy> GetAllHousekeepingHierarchy(Int32 hKID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<HousekeepingHierarchy> HousekeepingHierarchyCollection = new CustomList<HousekeepingHierarchy>();
     IDataReader reader = null;
     String sql = "select *from HousekeepingHierarchy where HKID=" + hKID;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             HousekeepingHierarchy newHousekeepingHierarchy = new HousekeepingHierarchy();
             newHousekeepingHierarchy.SetData(reader);
             HousekeepingHierarchyCollection.Add(newHousekeepingHierarchy);
         }
         return HousekeepingHierarchyCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:27,代码来源:HousekeepingHierarchy.cs


示例12: GetAllSegmentNames

 public static CustomList<SegmentNames> GetAllSegmentNames()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<SegmentNames> SegmentNamesCollection = new CustomList<SegmentNames>();
     IDataReader reader = null;
     const String sql = "select *from SegmentNames";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             SegmentNames newSegmentNames = new SegmentNames();
             newSegmentNames.SetData(reader);
             SegmentNamesCollection.Add(newSegmentNames);
         }
         return SegmentNamesCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:27,代码来源:SegmentNames.cs


示例13: SaveEntity

        public void SaveEntity(ref CustomList<EntityList> EntityList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
               Boolean blnTranStarted = false;

               try
               {
               conManager.BeginTransaction();

               ReSetSPName(EntityList);

               blnTranStarted = true;

               conManager.SaveDataCollectionThroughCollection(blnTranStarted, EntityList);

               conManager.CommitTransaction();
               blnTranStarted = false;
               conManager.Dispose();
               }
               catch (Exception Ex)
               {
               conManager.RollBack();
               throw Ex;
               }
               finally
               {
               if (conManager.IsNotNull())
               {
                   conManager.Dispose();
               }
               }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:32,代码来源:EntityManager.cs


示例14: GetAllReferenceTransaction

 public static CustomList<PopulateDropdownList> GetAllReferenceTransaction(Int32 DocListID,Int32 RefType)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<PopulateDropdownList> CmnTransactionCollection = new CustomList<PopulateDropdownList>();
     IDataReader reader = null;
     String sql = "spGetReferenceMasterTableData " + DocListID+","+RefType;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             PopulateDropdownList newCmnTransaction = new PopulateDropdownList();
             newCmnTransaction.SetData(reader);
             CmnTransactionCollection.Add(newCmnTransaction);
         }
         return CmnTransactionCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:27,代码来源:PopulateDropdownList.cs


示例15: GetSignatureForUniqueCode

 public static CustomList<Signature> GetSignatureForUniqueCode(String sql)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
     CustomList<Signature> signatureCollection = new CustomList<Signature>();
     IDataReader reader = null;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         if (reader.NextResult())
         {
             while (reader.Read())
             {
                 Signature newSignature = new Signature();
                 newSignature.SetData(reader);
                 signatureCollection.Add(newSignature);
             }
         }
         return signatureCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:29,代码来源:Signature.cs


示例16: DeleteGroup

        public void DeleteGroup(ref CustomList<UserGroup> userGroupList, ref CustomList<GroupRule> groupSecurityRuleList, ref CustomList<Group> groupList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
            Boolean blnTranStarted = false;

            try
            {
                ReSetDeleteSPName(groupList, groupSecurityRuleList, userGroupList);

                conManager.BeginTransaction();
                blnTranStarted = true;
                conManager.SaveDataCollectionThroughCollection(blnTranStarted, userGroupList, groupSecurityRuleList, groupList);
                userGroupList.AcceptChanges();
                groupSecurityRuleList.AcceptChanges();
                groupList.AcceptChanges();
                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception ex)
            {
                conManager.RollBack();
                throw (ex);
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:32,代码来源:GroupInformationManager.cs


示例17: SaveBankAccount

        public void SaveBankAccount(ref CustomList<CmnBankAccount> BankAccountList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
               Boolean blnTranStarted = false;

               try
               {
               conManager.BeginTransaction();

               ReSetSPName(BankAccountList);
               Int32 accountID = BankAccountList[0].AccountID;
               blnTranStarted = true;
               if (BankAccountList[0].IsAdded)
                   accountID = Convert.ToInt32(conManager.InsertData(blnTranStarted, BankAccountList));
               else
                   conManager.SaveDataCollectionThroughCollection(blnTranStarted, BankAccountList);

               BankAccountList.AcceptChanges();

               conManager.CommitTransaction();
               blnTranStarted = false;
               }
               catch (Exception Ex)
               {
               conManager.RollBack();
               throw Ex;
               }
               finally
               {
               if (conManager.IsNotNull())
               {
                   conManager.Dispose();
               }
               }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:35,代码来源:BankAccountManager.cs


示例18: Insert

        //zaki - Insert record and get Scope_Identity()
        public object Insert(CustomList<BaseItem> itemList, Util.OperationType operationType)
        {
            String spName = String.Empty;

            switch (operationType)
            {
                case Util.OperationType.Insert:
                    spName = itemList.InsertSpName;
                    break;

                case Util.OperationType.Update:
                    spName = itemList.UpdateSpName;
                    break;

                case Util.OperationType.Delete:
                    spName = itemList.DeleteSpName;
                    break;
            }

            Object[] parameterValues = null;
            object retVal = null;

            parameterValues = itemList[0].GetParameterValues();

            if (parameterValues.IsNotNull())
            {
               retVal = DataAccessHelper.ExecuteScalar(transaction, spName, parameterValues);
            }

            return retVal;
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:32,代码来源:CommandExecutor.cs


示例19: SaveMailSetup

        public void SaveMailSetup(CustomList<MailSetup> MailSetupList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
               Boolean blnTranStarted = false;

               try
               {
               conManager.BeginTransaction();
               blnTranStarted = true;
               ReSetSPName(ref MailSetupList);

               conManager.SaveDataCollectionThroughCollection(blnTranStarted, MailSetupList);

               MailSetupList.AcceptChanges();

               conManager.CommitTransaction();
               blnTranStarted = false;
               conManager.Dispose();
               }
               catch (Exception Ex)
               {
               conManager.RollBack();
               throw Ex;
               }
               finally
               {
               if (conManager.IsNotNull())
               {
                   conManager.Dispose();
               }
               }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:32,代码来源:MailSetupManager.cs


示例20: DeleteHKEntry

        public void DeleteHKEntry(ref CustomList<HouseKeepingValue> HKList, ref CustomList<HousekeepingHierarchy> lstChild)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;
            try
            {
                conManager.BeginTransaction();

                ReSetSPName(HKList, lstChild);

                blnTranStarted = true;

                conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstChild, HKList);

                lstChild.AcceptChanges();
                HKList.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:34,代码来源:HKEntryManager.cs



注:本文中的CustomList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CustomMessageBox类代码示例发布时间:2022-05-24
下一篇:
C# CustomInput类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap