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


C# DAL.executeReader方法代码示例

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


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

示例1: generateSavingsPassbook

 public int generateSavingsPassbook()
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT TOP 1 SavingsPassbookNo FROM MEMBER_SAVINGS_PASSBOOK ORDER BY SavingsPassbookNo DESC";
     SqlDataReader read = dal.executeReader(sql);
     int i = 0;
     while (read.Read())
     {
         i = (int)read[0];
     }
     return i + 1;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:12,代码来源:SavingsAccountModel.cs

示例2: generateCertificateNo

 public int generateCertificateNo()
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT TOP 1 CertificateNo FROM TIME_DEPOSIT ORDER BY CertificateNo DESC";
     SqlDataReader read = dal.executeReader(sql);
     int i = 0;
     while (read.Read())
     {
         String maxAcctNo = read[0].ToString().Split('-')[1];
         i = Convert.ToInt32(maxAcctNo);
     }
     return i + 1;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:13,代码来源:TimeDepositModel.cs

示例3: generateAccountNo

 public int generateAccountNo()
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT TOP 1 SavingsAccountNo FROM SAVINGS_ACCOUNT ORDER BY SavingsAccountNo DESC";
     SqlDataReader read = dal.executeReader(sql);
     int i = 0;
     while (read.Read())
     {
         String maxAcctNo = read[0].ToString().Split('-')[1];
         i = Convert.ToInt32(maxAcctNo);
     }
     return i + 1;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:13,代码来源:SavingsAccountModel.cs

示例4: selectActivePassbook

 public int selectActivePassbook(String accountNo)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT SavingsPassbookNo FROM MEMBER_SAVINGS_PASSBOOK WHERE SavingsAccountNo = @accountNo AND Status = 1";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@accountNo", this.selectSavingsAccount(accountNo));
     SqlDataReader read = dal.executeReader(sql, parameters);
     int i = 0;
     while (read.Read())
     {
         i = int.Parse(read[0].ToString());
     }
     return i;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:14,代码来源:TerminationModel.cs

示例5: checkBalanceRange

 public int checkBalanceRange(double MinBal, double MaxBal, int savings, int interestid)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT COUNT(*) FROM INTEREST_RATE WHERE AccountTypeId = @savings AND InterestId != @interestid AND Status = 1 AND MaximumRange != 0 AND ((@MinBal BETWEEN MinimumRange AND MaximumRange) OR (@MaxBal BETWEEN MinimumRange AND MaximumRange) OR (MinimumRange >= @MinBal AND MaximumRange <= @MaxBal))";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@savings", savings);
     parameters.Add("@interestid", interestid);
     parameters.Add("@MinBal", MinBal);
     parameters.Add("@MaxBal", MaxBal);
     SqlDataReader read = dal.executeReader(sql, parameters);
     int i = 0;
     while (read.Read())
     {
         i = (int)read[0];
     }
     return i;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:17,代码来源:InterestRatesModel.cs

示例6: selectMaximumWithdrawal

 public double selectMaximumWithdrawal(int AccountType)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT MaximumWithdrawal FROM MAXIMUM_WITHDRAWAL WHERE AccountTypeId = @TypeId";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@TypeId", AccountType);
     SqlDataReader read = dal.executeReader(sql, parameters);
     double d = 0;
     while (read.Read())
     {
         d = double.Parse(read[0].ToString());
     }
     return d;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:14,代码来源:SavingsTransactionModel.cs

示例7: selectMaintainingBalance

 public double selectMaintainingBalance(int AccountType)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT MaintainingBalance FROM MAINTAINING_BALANCE WHERE SavingsAccountTypeId = @TypeId";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@TypeId", AccountType);
     SqlDataReader read = dal.executeReader(sql, parameters);
     double d = 0;
     while (read.Read())
     {
         d = double.Parse(read[0].ToString());
     }
     return d;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:14,代码来源:SavingsTransactionModel.cs

示例8: selectMember

 public SqlDataReader selectMember(String accountNo)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT * FROM MEMBER INNER JOIN MEMBER_TYPE ON MEMBER.MemberTypeNo = MEMBER_TYPE.MemberTypeNo WHERE AccountNo = @acctNo";
     Dictionary<String, Object> parameters = new Dictionary<String, Object>();
     parameters.Add("@acctNo", accountNo);
     SqlDataReader ds = dal.executeReader(sql, parameters);
     return ds;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:9,代码来源:MembershipApplicationModel.cs

示例9: getLoanPassbook

 public int getLoanPassbook(String accountNo)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT TOP 1 LoanPassbookNo FROM MEMBER_LOAN_PASSBOOK WHERE AccountNo = @acctNo ORDER BY LoanPassbookNo DESC";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@acctNo", accountNo);
     SqlDataReader read = dal.executeReader(sql, parameters);
     int i = 0;
     while (read.Read())
     {
         i = (int)read[0];
     }
     return i;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:14,代码来源:MembershipApplicationModel.cs

示例10: checkBracketed

 public int checkBracketed(int savings, double MinBal, int earlyWithdrawalId)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT COUNT(*) FROM EARLY_WITHDRAWAL WHERE EarlyWithdrawalId != @earlyWithdrawalId AND AccountTypeId = @savings AND Status = 1 AND (MaximumRange >= @MinBal OR MinimumRange >= @MinBal)";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@earlyWithdrawalId", earlyWithdrawalId);
     parameters.Add("@savings", savings);
     parameters.Add("@MinBal", MinBal);
     SqlDataReader read = dal.executeReader(sql, parameters);
     int i = 0;
     while (read.Read())
     {
         i = (int)read[0];
     }
     return i;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:16,代码来源:EarlyWithdrawalModel.cs

示例11: getInsertId

 public int getInsertId()
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT TOP 1 AccountTypeId FROM SAVINGS_ACCOUNT_TYPE ORDER BY AccountTypeId DESC";
     SqlDataReader read = dal.executeReader(sql);
     int i = 0;
     while (read.Read())
     {
         i = (int)read[0];
     }
     return i + 1;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:12,代码来源:SavingsAccountTypeModel.cs

示例12: selectInitialDeposit

 public double selectInitialDeposit(int TypeId)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT InitialDeposit FROM SAVINGS_ACCOUNT_TYPE WHERE Status = 1 AND isArchived = 0 AND isTimeDeposit = 1 AND AccountTypeId = @TypeId";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@TypeId", TypeId);
     SqlDataReader read = dal.executeReader(sql, parameters);
     double d = 0;
     while (read.Read())
     {
         d = double.Parse(read[0].ToString());
     }
     return d;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:14,代码来源:TimeDepositModel.cs

示例13: selectClassNames

 public SqlDataReader selectClassNames(String newName, String oldName)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT dbo.RemoveSpecialChars(Description), dbo.RemoveSpecialChars(@newname), DelinquencyValue AS 'Delinquency', DelinquencyUnit AS 'Unit', DelinquencyBasis AS 'Basis' FROM Member_Status WHERE isArchived = 0 and Description != @oldName";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@newname", newName);
     parameters.Add("@oldName", oldName);
     SqlDataReader ds = dal.executeReader(sql,parameters);
     return ds;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:10,代码来源:MemberClassificationModel.cs

示例14: checkName

 public int checkName(String Name)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT COUNT(*) FROM SAVINGS_ACCOUNT_TYPE WHERE dbo.RemoveSpecialChars(SavingsTypeName) = dbo.RemoveSpecialChars(@Name) AND isArchived = 0";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@Name", Name);
     SqlDataReader read = dal.executeReader(sql, parameters);
     int i = 0;
     while (read.Read())
     {
         i = (int)read[0];
     }
     return i;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:14,代码来源:SavingsAccountTypeModel.cs

示例15: checkInterest

 public int checkInterest(int savings, double interest, int interestid)
 {
     DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
     String sql = "SELECT COUNT(*) FROM INTEREST_RATE WHERE AccountTypeId = @savings AND InterestRate = @interest AND InterestId != @interestid";
     Dictionary<String, Object> parameters = new Dictionary<string, object>();
     parameters.Add("@savings", savings);
     parameters.Add("@interest", interest);
     parameters.Add("@interestid", interestid);
     SqlDataReader read = dal.executeReader(sql, parameters);
     int i = 0;
     while (read.Read())
     {
         i = (int)read[0];
     }
     return i;
 }
开发者ID:herberttagudin,项目名称:cms-sln,代码行数:16,代码来源:InterestRatesModel.cs


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