当前位置: 首页>>代码示例>>C#>>正文


C# CustomList类代码示例

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


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


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