本文整理汇总了C#中DAL.executeNonQuery方法的典型用法代码示例。如果您正苦于以下问题:C# DAL.executeNonQuery方法的具体用法?C# DAL.executeNonQuery怎么用?C# DAL.executeNonQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DAL
的用法示例。
在下文中一共展示了DAL.executeNonQuery方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: insertSavingsTransaction
public int insertSavingsTransaction()
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertSavingsTransaction @SavingsAccountNo, @TransactionMode, @Amount, @Representative, @SavingsPassbook";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@SavingsAccountNo", this.AccountNo);
parameters.Add("@TransactionMode", this.TransactionMode);
parameters.Add("@Amount", this.Amount);
parameters.Add("@Representative", this.Representative);
parameters.Add("@SavingsPassbook", this.PassbookNo);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
if (result == 1)
{
if (this.TransactionMode == "Withdraw")
{
String sql2 = "UPDATE SAVINGS_ACCOUNT SET Balance = Balance - @Amount WHERE SavingsAccountNo = @SavingsAccountNo";
Dictionary<String, Object> parameters2 = new Dictionary<string, object>();
parameters2.Add("@SavingsAccountNo", this.AccountNo);
parameters2.Add("@Amount", this.Amount);
dal.executeNonQuery(sql2, parameters2);
}
else if (this.TransactionMode == "Deposit")
{
String sql2 = "UPDATE SAVINGS_ACCOUNT SET Balance = Balance + @Amount WHERE SavingsAccountNo = @SavingsAccountNo";
Dictionary<String, Object> parameters2 = new Dictionary<string, object>();
parameters2.Add("@SavingsAccountNo", this.AccountNo);
parameters2.Add("@Amount", this.Amount);
dal.executeNonQuery(sql2, parameters2);
}
}
return result;
}
示例2: insertFee
public int insertFee(String feeDesc, Double feeAmount, ArrayList memberTypeNo, int Status)
{
int resultInner = 0;
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertFee @feeDesc, @Amount, @Status;";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@feeDesc", feeDesc);
parameters.Add("@Amount", feeAmount);
parameters.Add("@Status", Status);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
Object rs = dal.executeScalar("SELECT @@IDENTITY"); //problem area
int id = int.Parse(rs.ToString());
if (id != 0)
{
foreach (int i in memberTypeNo)
{
String sqlInner = "INSERT INTO MEMBER_TYPE_FEE (MemberTypeNo, FeeId) VALUES (@memberTypeNo, @feeId)";
Dictionary<String, Object> parametersInner = new Dictionary<string, object>();
parametersInner.Add("@memberTypeNo", i);
parametersInner.Add("@feeId", id);
resultInner = Convert.ToInt32(dal.executeNonQuery(sqlInner, parametersInner));
}
}
return resultInner;
}
示例3: insertClass
public int insertClass(String className, int delinquencyValue, String delinquencyUnit, String delinquencyBasis, ArrayList memberTypeNo, int Status)
{
int resultInner = 0;
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertClassification @className, @delValue, @delUnit, @delBasis, @Status;";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@className", className);
parameters.Add("@delValue", delinquencyValue);
parameters.Add("@delUnit", delinquencyUnit);
parameters.Add("@delBasis", delinquencyBasis);
parameters.Add("@Status", Status);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
Object rs = dal.executeScalar("SELECT @@IDENTITY");
int id = int.Parse(rs.ToString());
if (id != 0)
{
foreach (int i in memberTypeNo)
{
String sqlInner = "INSERT INTO MEMBER_TYPE_STATUS (MemberTypeNo, MemberStatusNo) VALUES (@memberTypeNo, @statusNo)";
Dictionary<String, Object> parametersInner = new Dictionary<string, object>();
parametersInner.Add("@memberTypeNo", i);
parametersInner.Add("@statusNo", id);
resultInner = Convert.ToInt32(dal.executeNonQuery(sqlInner, parametersInner));
}
}
return resultInner;
}
示例4: insertloanCharge
public int insertloanCharge(String chargeName, double amount, String amountStatus, ArrayList loanTypeNo, int Status)
{
int id = 0;
int resultInner = 0;
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertCharges @Status, @ChargeName, @Amount, @AmountStatus, @isArchived";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@Status", Status);
parameters.Add("@ChargeName", chargeName);
parameters.Add("@Amount", amount);
parameters.Add("@AmountStatus", amountStatus);
parameters.Add("@isArchived", 0);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
String sqlSelect = "Select ChargeId from CHARGES where isArchived=0 and ChargeName= " + "'" + chargeName + "'";
id = Convert.ToInt32(dal.executeScalar(sqlSelect));
if (result != 0)
{
foreach (int i in loanTypeNo)
{
String sqlInner = "INSERT INTO LOAN_TYPE_CHARGES VALUES (@LoanTypeId, @ChargeId)";
Dictionary<String, Object> parametersInner = new Dictionary<string, object>();
parametersInner.Add("@LoanTypeId", i);
parametersInner.Add("@ChargeId", id);
resultInner = Convert.ToInt32(dal.executeNonQuery(sqlInner, parametersInner));
}
}
return resultInner;
}
示例5: insertTimeDepositDetails
public int insertTimeDepositDetails()
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertTimeDepositDetails @CertificateNo, @TotalAmount, @Penalty";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@CertificateNo", this.CertificateNo);
parameters.Add("@TotalAmount", this.TotalAmount);
parameters.Add("@Penalty", this.Penalty);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
if (result == 1)
{
String sql2 = "UPDATE TIME_DEPOSIT SET Status = 0 WHERE CertificateNo = @CertificateNo";
Dictionary<String, Object> parameters2 = new Dictionary<string, object>();
parameters2.Add("@CertificateNo", this.CertificateNo);
dal.executeNonQuery(sql2, parameters2);
}
return result;
}
示例6: deleteClass
public int deleteClass(int statusNo)
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "UPDATE Member_Status SET isArchived = 1 WHERE MemberStatusNo = @statusNo";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@statusNo", statusNo);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
return result;
}
示例7: deleteloanCharge
public int deleteloanCharge(int chargeId)
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "UPDATE CHARGES SET isArchived = 1 WHERE ChargeId = @ChargeId";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@ChargeId", chargeId);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
return result;
}
示例8: insertContribution
public int insertContribution()
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertContribution @accountNo, @amount";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@AccountNo", accountNo);
parameters.Add("@amount", amount);
int result = dal.executeNonQuery(sql, parameters);
return result;
}
示例9: insertMaximumWithdrawal
public int insertMaximumWithdrawal()
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertMaximumWithdrawal @TypeId, @MaxWith, @Status";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@TypeId", this.AccountTypeId);
parameters.Add("@MaxWith", this.MaxWith);
parameters.Add("@Status", this.Status);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
return result;
}
示例10: insertLoanAmortization
public void insertLoanAmortization(int LappId, String dueDate, double amount)
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertLoanAmortization @LoanApplicationId,@AmortizationDueDate, @Amount";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@LoanApplicationId", LappId);
parameters.Add("@AmortizationDueDate", dueDate);
parameters.Add("@Amount", amount);
dal.executeNonQuery(sql, parameters);
}
示例11: insertTermination
public int insertTermination(String reason, String details, String accountNo)
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertTermination @Reason, @Details, @AccountNo";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@Reason", reason);
parameters.Add("@Details", details);
parameters.Add("@AccountNo", accountNo);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
return result;
}
示例12: insertSavingsTransaction
public int insertSavingsTransaction()
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertTimeDeposit @CertificateNo, @AccountTypeId, @AccountNo, @Amount, @Maturity";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@CertificateNo", this.CertificateNo);
parameters.Add("@AccountTypeId", this.AccountTypeId);
parameters.Add("@AccountNo", this.AccountNo);
parameters.Add("@Amount", this.Amount);
parameters.Add("@Maturity", this.Maturity);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
return result;
}
示例13: insertCollateral
public void insertCollateral(int LoanApplicationId, String SerialNo, String Name, String Condition, String Description, String YearAcquired, double AcquiredAmount)
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertPropertyCollateral @LoanApplicationId,@SerialNo,@Name,@Condition,@Description,@YearAcquired,@AcquiredAmount";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@LoanApplicationId", LoanApplicationId);
parameters.Add("@SerialNo", SerialNo);
parameters.Add("@Name", Name);
parameters.Add("@Condition", Condition);
parameters.Add("@Description", Description);
parameters.Add("@YearAcquired", YearAcquired);
parameters.Add("@AcquiredAmount", AcquiredAmount);
dal.executeNonQuery(sql, parameters);
}
示例14: insertMaintainingBalance
public int insertMaintainingBalance()
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertMaintainingBalance @TypeId, @Balance, @Charge, @ChargeStatus, @Duration, @DurationStatus, @Status";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@TypeId", this.AccountTypeId);
parameters.Add("@Balance", this.MaintainingBalance);
parameters.Add("@Charge", this.ServiceCharge);
parameters.Add("@ChargeStatus", this.ServiceChargeStatus);
parameters.Add("@Duration", this.ServiceChargeDuration);
parameters.Add("@DurationStatus", this.ServiceChargeDurationStatus);
parameters.Add("@Status", this.Status);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
return result;
}
示例15: insertMemberType
public int insertMemberType(String TypeName, int ServiceLoan, int ServiceSavings, int ServiceShareCapital, int MinAge, int MaxAge, int Status)
{
DAL dal = new DAL(ConfigurationManager.ConnectionStrings["CMS"].ConnectionString);
String sql = "EXEC insertMemberType @TypeName, @hasLoan, @hasSavings, @hasShareCapital, @MinAge, @MaxAge, @Status";
Dictionary<String, Object> parameters = new Dictionary<string, object>();
parameters.Add("@TypeName", TypeName);
parameters.Add("@hasLoan", ServiceLoan);
parameters.Add("@hasSavings", ServiceSavings);
parameters.Add("@hasShareCapital", ServiceShareCapital);
parameters.Add("@MinAge", MinAge);
parameters.Add("@MaxAge", MaxAge);
parameters.Add("@Status", Status);
int result = Convert.ToInt32(dal.executeNonQuery(sql, parameters));
return result;
}