//public void UpdateLoanOnlyDeductAmount() //{ // SQLHelper.ExecuteNonQuery("INSERT INTO [dbo].[UpdateLog] ([UpdatedDate] ,[RefNo] ,[ReferenceTable] ,[Division] ,[EmpNo] ,[Narration1] ,[Narration2] ,[Narration3] ,[Narration4] ,[Narration5] ,[UpdatedUser]) VALUES (getdate() ,'" + IntLoanCode + "' ,'CHKLoan' ,'" + StrDivision + "' ,'" + StrEmpNo + "' ,'" + FlInstallmentAmount.ToString() + "' ,'" + IntDeductionGroup.ToString() + "' ,'" + IntDeductCode.ToString() + "' ,'" + IntFromYear.ToString() + "' ,'" + IntFromMonth.ToString() + "' ,'" + StrUserId + "')", CommandType.Text); // SQLHelper.ExecuteNonQuery("UPDATE CHKLoan SET LoanName ='" + strName + "', InstallmentAmount ='" + FlInstallmentAmount + "', AccountNo ='" + "NA" + "' WHERE (LoanCode = '" + IntLoanCode + "') and (DivisionCode ='" + strDivision + "') and (EmployeeNo ='" + StrEmpNo + "') and (StartMonth='" + IntFromMonth + "') and (StartYear='" + IntFromYear + "')", CommandType.Text); //} public void DeleteLoan() { SQLHelper.ExecuteNonQuery("INSERT INTO [dbo].[DeleteLog]([DeletedDate],[RefNo],[ReferenceTable],[EmpNo],[Amount],[Narration1],[Naration2],DeletedBy) VALUES(getdate(),'" + IntLoanCode + "','CHKLoan','" + StrEmpNo + "' ,'" + FlInstallmentAmount + "','" + IntDeductionGroup.ToString() + "','" + IntDeductCode.ToString() + "','" + StrUserId + "')", CommandType.Text); SQLHelper.ExecuteNonQuery("DELETE FROM CHKLoan WHERE (LoanCode = '" + IntLoanCode + "')", CommandType.Text); }
public void UpdateLoanOnlyDeductAmount(Boolean boolOnlyBalanceUpdate) { SQLHelper.ExecuteNonQuery("INSERT INTO [dbo].[UpdateLog] ([UpdatedDate] ,[RefNo] ,[ReferenceTable] ,[Division] ,[EmpNo] ,[Narration1] ,[Narration2] ,[Narration3] ,[Narration4] ,[Narration5] ,[UpdatedUser]) VALUES (getdate() ,'" + IntLoanCode + "' ,'CHKLoan' ,'" + StrDivision + "' ,'" + StrEmpNo + "' ,'" + FlInstallmentAmount.ToString() + "' ,'" + IntDeductionGroup.ToString() + "' ,'" + IntDeductCode.ToString() + "' ,'" + IntFromYear.ToString() + "' ,'" + IntFromMonth.ToString() + "' ,'" + StrUserId + "')", CommandType.Text); if (boolOnlyBalanceUpdate) { SQLHelper.ExecuteNonQuery("UPDATE CHKLoan SET LoanName ='" + strName + "', InstallmentAmount ='" + FlInstallmentAmount + "', AccountNo ='" + "NA" + "' WHERE (LoanCode = '" + IntLoanCode + "') and (DivisionCode ='" + strDivision + "') and (EmployeeNo ='" + StrEmpNo + "') and (StartMonth='" + IntFromMonth + "') and (StartYear='" + IntFromYear + "')", CommandType.Text); } else { SQLHelper.ExecuteNonQuery("UPDATE CHKLoan SET LoanName ='" + strName + "', InstallmentAmount ='" + FlInstallmentAmount + "', AccountNo ='" + "NA" + "',Principalamount='" + flPrincipalAmount + "', NoofInstallments='" + FlNoOfInstallments + "', RecovredInstallments=0, RecoveredAmount=0, BalanceAmount='" + flPrincipalAmount + "' WHERE (LoanCode = '" + IntLoanCode + "') and (DivisionCode ='" + strDivision + "') and (EmployeeNo ='" + StrEmpNo + "') and (StartMonth='" + IntFromMonth + "') and (StartYear='" + IntFromYear + "')", CommandType.Text); } }