public PayableViewModel() { Pager = new PaginationInfo(); FriendlyMessage = new List <FriendlyMessage>(); PayableInfo = new PayableInfo(); PayableList = new List <PayableInfo>(); PayableHistoryInfo = new PayableHistoryInfo(); PayableHistoryList = new List <PayableHistoryInfo>(); TransactionInfo = new TransactionInfo(); }
public PayableHistoryInfo GetPaymentHistoryDetailsValues(DataRow dr) { PayableHistoryInfo Info = new PayableHistoryInfo(); if (!dr.IsNull("ReciptNo")) { Info.ReceiptNo = Convert.ToString(dr["ReciptNo"]); } if (!dr.IsNull("PaymentMode")) { Info.PaymentModeName = Convert.ToString(dr["PaymentMode"]); } if (!dr.IsNull("PaymentStatus")) { Info.PaymentStatus = Convert.ToString(dr["PaymentStatus"]); } if (!dr.IsNull("AmountPaid")) { Info.AmountPaid = Convert.ToDecimal(dr["AmountPaid"]); } if (!dr.IsNull("PayableDate")) { Info.PayableDate = Convert.ToDateTime(dr["PayableDate"]); } if (!dr.IsNull("TransactionModeNo")) { Info.Transaction_No = Convert.ToString(dr["TransactionModeNo"]); } return(Info); }
public List <SqlParameter> SetValuesInPayableHistory(PayableHistoryInfo PayableHistoryInfo, int PayableId) { PayableInfo PayableInfo = new PayableInfo(); List <SqlParameter> sqlParam = new List <SqlParameter>(); if (PayableHistoryInfo.PayableHistoryId != 0) { sqlParam.Add(new SqlParameter("PayableHistoryId", PayableHistoryInfo.PayableHistoryId)); } else { sqlParam.Add(new SqlParameter("@CreatedDate", PayableHistoryInfo.CreatedDate)); sqlParam.Add(new SqlParameter("@CreatedBy", PayableHistoryInfo.CreatedBy)); } sqlParam.Add(new SqlParameter("@PayableId", PayableId)); Logger.Debug("Payable Controller PayableId:" + PayableId); sqlParam.Add(new SqlParameter("@AmountPaid", PayableHistoryInfo.AmountPaid)); Logger.Debug("Payable Controller AmountPaid:" + PayableHistoryInfo.AmountPaid); sqlParam.Add(new SqlParameter("@ModeOfPayment", PayableHistoryInfo.ModeOfPayment)); Logger.Debug("Payable Controller ModeOfPayment:" + PayableHistoryInfo.ModeOfPayment); sqlParam.Add(new SqlParameter("@PayableDate", PayableHistoryInfo.PayableDate)); Logger.Debug("Payable Controller PayableDate:" + PayableHistoryInfo.PayableDate); sqlParam.Add(new SqlParameter("@ReciptNo", PayableHistoryInfo.ReceiptNo)); Logger.Debug("Payable Controller ReceiptNo:" + PayableHistoryInfo.ReceiptNo); sqlParam.Add(new SqlParameter("@TransactionModeNo", PayableHistoryInfo.TransactionModeNo)); Logger.Debug("Payable Controller TransactionModeNo:" + PayableHistoryInfo.TransactionModeNo); sqlParam.Add(new SqlParameter("@BankName", PayableHistoryInfo.BankName)); Logger.Debug("Payable Controller BankName:" + PayableHistoryInfo.BankName); if (PayableHistoryInfo.Cheque_Date != DateTime.MinValue) { sqlParam.Add(new SqlParameter("@TransactionDate", PayableHistoryInfo.Cheque_Date)); Logger.Debug("Payable Controller TransactionDate:" + PayableHistoryInfo.Cheque_Date); } else { sqlParam.Add(new SqlParameter("@TransactionDate", null)); Logger.Debug("Payable Controller TransactionDate:" + null); } sqlParam.Add(new SqlParameter("@UpdatedDate", PayableHistoryInfo.UpdatedDate)); sqlParam.Add(new SqlParameter("@UpdatedBy", PayableHistoryInfo.UpdatedBy)); return(sqlParam); }
public int InsertPayableHistory(PayableHistoryInfo PayableHistoryInfo, int PayableId) { return(Convert.ToInt32(_sqlHelper.ExecuteScalerObj(SetValuesInPayableHistory(PayableHistoryInfo, PayableId), Storeprocedures.spInsertPayableHistory.ToString(), CommandType.StoredProcedure))); }