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


C# ConnectionManager.OpenDataReader方法代码示例

本文整理汇总了C#中API.DAL.ConnectionManager.OpenDataReader方法的典型用法代码示例。如果您正苦于以下问题:C# ConnectionManager.OpenDataReader方法的具体用法?C# ConnectionManager.OpenDataReader怎么用?C# ConnectionManager.OpenDataReader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在API.DAL.ConnectionManager的用法示例。


在下文中一共展示了ConnectionManager.OpenDataReader方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: GetAllCmnBankAccountType

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

示例3: 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

示例4: 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

示例5: LoadMailInfo

 public DataSet LoadMailInfo(Int32 ReportID)
 {
     ConnectionManager conManager = new ConnectionManager(ConName);
     IDataReader reader = null;
     try
     {
         DataSet dsRef = new DataSet();
         const String spName = "spGetMailInfo";
         conManager.OpenDataReader(out reader, spName, ReportID);
         dsRef = Util.DataReaderToDataSet(reader);
         return dsRef;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (conManager != null)
         {
             conManager.CloseConnection();
             conManager.Dispose();
         }
         if (reader.IsNotNull() && reader.IsClosed.IsFalse())
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:27,代码来源:ReportSuite.cs

示例6: GetReportValue

        public static CustomList<ParameterFilterValue> GetReportValue(string parent)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList<ParameterFilterValue> ParameterFilterValueCollection = new CustomList<ParameterFilterValue>();
            IDataReader reader = null;
            String sql = "select OrgKey As ActualValues, OrgName As DisplayMember, OrgName As [Values]  from Gen_Org Where OrgParentKey in(" + parent + ")";//'" + userCode + "'";
            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ParameterFilterValue newParameterFilterValue = new ParameterFilterValue();
                    newParameterFilterValue.SetData(reader);
                    ParameterFilterValueCollection.Add(newParameterFilterValue);
                }
                return ParameterFilterValueCollection;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:33,代码来源:ParameterFilterValue.cs

示例7: 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

示例8: 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

示例9: InsertWorkFlowTransaction

 public void InsertWorkFlowTransaction(int DocListID,Int32 StatusID, String UserID, int CompanyID, long TransactionID = 0,bool IsApprove=true, String Comment = "", bool IsUpdate = false, bool IsDelete = false)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     IDataReader reader = null;
     String sql = "EXEC spInsertCmnWorkFlowTransaction " + DocListID+","+StatusID+",'"+UserID+"',"+CompanyID+","+TransactionID+","+IsApprove+",'"+Comment+"',"+IsUpdate+","+IsDelete;
     try
     {
         conManager.OpenDataReader(sql, out reader);
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:19,代码来源:WorkFlowTransactionManager.cs

示例10: GetAllContactTypeChild

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

示例11: LoadReportSourceDataSet

 public void LoadReportSourceDataSet(ref DataSet dsRef, CommandType cmdType, String strCmdText, IDbDataParameter[] sqlParam)
 {
     ConnectionManager conManager = new ConnectionManager(ConName);
     IDataReader reader = null;
     try
     {
         if (sqlParam.IsNull() || sqlParam.Length.IsZero())
             conManager.OpenDataReader(strCmdText, out reader);
         else
             conManager.OpenDataReader(out reader, strCmdText, sqlParam);
         //
         dsRef = Util.DataReaderToDataSet(reader);
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (conManager != null)
         {
             conManager.CloseConnection();
             conManager.Dispose();
         }
         if (reader.IsNotNull() && reader.IsClosed.IsFalse())
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:28,代码来源:ReportSuite.cs

示例12: GetAllItemMasterByItemCode

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

示例13: GetAllAccReportConfigurationHead

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

示例14: GetAllAccChequeStatusList

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

示例15: FindAllItemMasterGroupWise

 public static CustomList<ItemMaster> FindAllItemMasterGroupWise()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<ItemMaster> ItemMasterCollection = new CustomList<ItemMaster>();
     IDataReader reader = null;
     String sql = "select ItemCode,ItemDescription,ItemGroupID,ItemSubGroupID from ItemMaster";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             ItemMaster newItemMaster = new ItemMaster();
             newItemMaster.SetDataItem(reader);
             ItemMasterCollection.Add(newItemMaster);
         }
         return ItemMasterCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:27,代码来源:ItemMaster.cs


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