public DataTable GetPaymentFromCustomerApplyListByPaymentFromCustomerId(PaymentFromCustomerApplyListUI paymentFromCustomerApplyListUI) { DataTable dtb = new DataTable(); dtb = PaymentFromCustomerApplyListDAL.GetPaymentFromCustomerApplyListByPaymentFromCustomerId(paymentFromCustomerApplyListUI); return(dtb); }
public DataTable GetPaymentFromCustomerApplyListBySearchParameters(PaymentFromCustomerApplyListUI PaymentFromCustomerApplyListUI) { DataTable dtb = new DataTable(); dtb = PaymentFromCustomerApplyListDAL.GetPaymentFromCustomerApplyListBySearchParameters(PaymentFromCustomerApplyListUI); return(dtb); }
public int DeletePaymentFromCustomerApply(PaymentFromCustomerApplyListUI PaymentFromCustomerApplyListUI) { int result = 0; result = PaymentFromCustomerApplyListDAL.DeletePaymentFromCustomerApply(PaymentFromCustomerApplyListUI); return(result); }
public int DeletePaymentFromCustomerApply(PaymentFromCustomerApplyListUI PaymentFromCustomerApplyListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_PaymentFromCustomerApply_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_PaymentFromCustomerApplyId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_PaymentFromCustomerApplyId"].Value = PaymentFromCustomerApplyListUI.Tbl_PaymentFromCustomerApplyId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeletePaymentFromCustomerApply()"; logExcpUIobj.ResourceName = "PaymentFromCustomerApplyListDAL.CS"; logExcpUIobj.RecordId = PaymentFromCustomerApplyListUI.Tbl_PaymentFromCustomerApplyId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[PaymentFromCustomerApplyListDAL : DeletePaymentFromCustomerApply] An error occured in the processing of Record Id : " + PaymentFromCustomerApplyListUI.Tbl_PaymentFromCustomerApplyId + ". Details : [" + exp.ToString() + "]"); } return(result); }
private void BindListBySearchParameters(PaymentFromCustomerApplyListUI paymentFromCustomerApplyListUI) { try { DataTable dtb = paymentFromCustomerApplyListBAL.GetPaymentFromCustomerApplyListBySearchParameters(this.paymentFromCustomerApplyListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvData.DataSource = dtb; gvData.DataBind(); divError.Visible = false; gvData.Visible = true; } else { divError.Visible = true; lblError.Text = Resources.GlobalResource.msgNoRecordFound; gvData.Visible = false; } txtSearch.Text = ""; txtSearch.Focus(); } catch (Exception exp) { logExcpUIobj.MethodName = "BindListBySearchParameters()"; logExcpUIobj.ResourceName = "Finance_Bank_Accounting_Payment_From_Customers_PaymentFromCustomerApplyList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Bank_Accounting_Payment_From_Customers_PaymentFromCustomerApplyList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetPaymentFromCustomerApplyListBySearchParameters(PaymentFromCustomerApplyListUI PaymentFromCustomerApplyListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_PaymentFromCustomerApply_SelectBySearchParameters", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@Search", SqlDbType.NVarChar); sqlCmd.Parameters["@Search"].Value = PaymentFromCustomerApplyListUI.Search; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "GetPaymentFromCustomerApplyListBySearchParameters()"; logExcpUIobj.ResourceName = "PaymentFromCustomerApplyListDAL.CS"; logExcpUIobj.RecordId = "Search = " + PaymentFromCustomerApplyListUI.Search; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[PaymentFromCustomerApplyListDAL : GetPaymentFromCustomerApplyListBySearchParameters] An error occured in the processing of Record Search = " + PaymentFromCustomerApplyListUI.Search + " . Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public void BindPaymentFromCustomerApply(PaymentFromCustomerApplyListUI paymentFromCustomerApplyListUI) { try { DataTable dtb = paymentFromCustomerApplyListBAL.GetPaymentFromCustomerApplyListByPaymentFromCustomerId(paymentFromCustomerApplyListUI); { if (dtb.Rows.Count > 0) { txtPaymentFromCustomer.Text = dtb.Rows[0]["tbl_PaymentFromCustomer"].ToString(); txtPaymentFromCustomerGuid.Text = dtb.Rows[0]["tbl_PaymentFromCustomerId"].ToString(); txtCustomerID.Text = dtb.Rows[0]["tbl_Customer"].ToString(); txtCustomerName.Text = dtb.Rows[0]["tbl_Customer"].ToString(); txtType.Text = dtb.Rows[0]["Type"].ToString(); txtCurrencyID.Text = dtb.Rows[0]["CurrencyName"].ToString(); txtDocumentNumber.Text = dtb.Rows[0]["DocumentNumber"].ToString(); txtOrignalAmount.Text = dtb.Rows[0]["Total"].ToString(); txtApplydate.Text = dtb.Rows[0]["ApplyDate"].ToString(); txtUnappliedAmount.Text = dtb.Rows[0]["Total"].ToString(); gvData.DataSource = dtb; gvData.DataBind(); divError.Visible = false; gvData.Visible = true; } else { gvData.Visible = false; this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearFormAppy();", true); } } } catch (Exception exp) { logExcpUIobj.MethodName = "txtDownPaymentcust_TextChanged()"; logExcpUIobj.ResourceName = "Finance_Bank_Accounting_Payment_From_Customers_PaymentFromCustomerApplyForm.CS"; logExcpUIobj.RecordId = paymentFromCustomerApplyFormUI.Tbl_PaymentFromCustomerApplyId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Bank_Accounting_Payment_From_Customers_PaymentFromCustomerApplyForm : txtDownPaymentcust_TextChanged] An error occured in the processing of Record Details : [" + exp.ToString() + "]"); } }
public DataTable GetPaymentFromCustomerApplyListByPaymentFromCustomerId(PaymentFromCustomerApplyListUI paymentFromCustomerApplyListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_PaymentFromCustomerApply_SelectByPaymentFromCustomerId", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_paymentFromCustomerId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_paymentFromCustomerId"].Value = paymentFromCustomerApplyListUI.Tbl_PaymentFromCustomerId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "GetPaymentFromCustomerApplyListByPaymentFromCustomerId()"; logExcpUIobj.ResourceName = "PaymentFromCustomerFormDAL.CS"; logExcpUIobj.RecordId = paymentFromCustomerApplyListUI.Tbl_PaymentFromCustomerId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[PaymentFromCustomerFormDAL : GetPaymentFromCustomerApplyByPaymentFromCustomerId] An error occured in the processing of Record Id : " + paymentFromCustomerApplyListUI.Tbl_PaymentFromCustomerId + ". Details : [" + exp.ToString() + "]"); } return(dtbl); }