private void BindListBySearchParameters(DownPaymentFromCustomerApplyListUI downPaymentFromCustomerApplyListUI) { try { DataTable dtb = downPaymentFromCustomerApplyListBAL.GetDownPaymentFromCustomerApplyListBySearchParameters(this.downPaymentFromCustomerApplyListUI); 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_Customer_Down_Payment_DownPaymentFromCustomerApplyList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Bank_Accounting_Customer_Down_Payment_DownPaymentFromCustomerApplyList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public int DeleteDownPaymentFromCustomerApply(DownPaymentFromCustomerApplyListUI downPaymentFromCustomerApplyListUI) { int result = 0; result = downPaymentFromCustomerApplyListDAL.DeleteDownPaymentFromCustomerApply(downPaymentFromCustomerApplyListUI); return(result); }
public DataTable GetDownPaymentFromCustomerApplyListByDownPaymentFromCustomerId(DownPaymentFromCustomerApplyListUI downPaymentFromCustomerApplyListUI) { DataTable dtb = new DataTable(); dtb = downPaymentFromCustomerApplyListDAL.GetDownPaymentFromCustomerApplyListByDownPaymentFromCustomerId(downPaymentFromCustomerApplyListUI); return(dtb); }
public DataTable GetDownPaymentFromCustomerApplyListBySearchParameters(DownPaymentFromCustomerApplyListUI downPaymentFromCustomerApplyListUI) { DataTable dtb = new DataTable(); dtb = downPaymentFromCustomerApplyListDAL.GetDownPaymentFromCustomerApplyListBySearchParameters(downPaymentFromCustomerApplyListUI); return(dtb); }
public int DeleteDownPaymentFromCustomerApply(DownPaymentFromCustomerApplyListUI downPaymentFromCustomerApplyListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_DownPaymentFromCustomerApply_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_DownPaymentFromCustomerApplyId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_DownPaymentFromCustomerApplyId"].Value = downPaymentFromCustomerApplyListUI.Tbl_DownPaymentFromCustomerApplyId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeleteDownPaymentFromCustomerApply()"; logExcpUIobj.ResourceName = "DownPaymentFromCustomerApplyListDAL.CS"; logExcpUIobj.RecordId = downPaymentFromCustomerApplyListUI.Tbl_DownPaymentFromCustomerApplyId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[DownPaymentFromCustomerApplyListDAL : DeleteDownPaymentFromCustomerApply] An error occured in the processing of Record Id : " + downPaymentFromCustomerApplyListUI.Tbl_DownPaymentFromCustomerApplyId + ". Details : [" + exp.ToString() + "]"); } return(result); }
public DataTable GetDownPaymentFromCustomerApplyListBySearchParameters(DownPaymentFromCustomerApplyListUI downPaymentFromCustomerApplyListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_DownPaymentFromCustomerApply_SelectBySearchParameters", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@Search", SqlDbType.NVarChar); sqlCmd.Parameters["@Search"].Value = downPaymentFromCustomerApplyListUI.Search; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "GetDownPaymentFromCustomerApplyListBySearchParameters()"; logExcpUIobj.ResourceName = "DownPaymentFromCustomerApplyListDAL.CS"; logExcpUIobj.RecordId = "Search = " + downPaymentFromCustomerApplyListUI.Search; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[DownPaymentFromCustomerApplyListDAL : GetDownPaymentFromCustomerApplyListBySearchParameters] An error occured in the processing of Record Search = " + downPaymentFromCustomerApplyListUI.Search + " . Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public void BindDownPaymentFromCustomerApply(DownPaymentFromCustomerApplyListUI downPaymentFromCustomerApplyListUI) { try { DataTable dtb = downPaymentFromCustomerApplyListBAL.GetDownPaymentFromCustomerApplyListByDownPaymentFromCustomerId(downPaymentFromCustomerApplyListUI); { if (dtb.Rows.Count > 0) { txtDownPaymentcust.Text = dtb.Rows[0]["tbl_DownPaymentFromCustomer"].ToString(); txtDownPaymentcustGuid.Text = dtb.Rows[0]["tbl_DownPaymentFromCustomerId"].ToString(); txtCustomerID.Text = dtb.Rows[0]["tbl_Customer"].ToString(); txtCustomerName.Text = dtb.Rows[0]["tbl_Customer"].ToString(); txtType.Text = dtb.Rows[0]["opt_DocumentType"].ToString(); txtCurrencyID.Text = dtb.Rows[0]["CurrencyName"].ToString(); txtDocumentNumber.Text = dtb.Rows[0]["DocumentNumber"].ToString(); txtOrignalAmount.Text = dtb.Rows[0]["TotalAmount"].ToString(); txtApplydate.Text = dtb.Rows[0]["ApplyDate"].ToString(); txtUnappliedAmount.Text = dtb.Rows[0]["TotalAmount"].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_Customer_Down_Payment_Default.CS"; logExcpUIobj.RecordId = downPaymentFromCustomerApplyFormUI.Tbl_DownPaymentFromCustomerApplyId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Bank_Accounting_Customer_Down_Payment_Default : txtDownPaymentcust_TextChanged] An error occured in the processing of Record Details : [" + exp.ToString() + "]"); } }