private void BindPaymentTermsList() { try { PaymentTermsListBAL paymentTermsListBAL = new PaymentTermsListBAL(); PaymentTermsListUI PaymentTermsListUI = new PaymentTermsListUI(); DataTable dtb = paymentTermsListBAL.GetPaymentTermsList(); if (dtb.Rows.Count > 0 && dtb != null) { gvPaymentTermsSearch.DataSource = dtb; gvPaymentTermsSearch.DataBind(); divPaymentTermsSearchError.Visible = false; } else { divPaymentTermsSearchError.Visible = true; lblError.Text = Resources.GlobalResource.msgNoRecordFound; gvPaymentTermsSearch.Visible = false; } } catch (Exception exp) { logExcpUIobj.MethodName = "BindPaymentTermsList()"; logExcpUIobj.ResourceName = "Finance_Accounts_Payable_Employee_General_Expenses_EmployeeGeneralExpensesForm.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Accounts_Payable_Employee_General_Expenses_EmployeeGeneralExpensesForm : BindPaymentTermsList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
private void BindListBySearchParameters(PaymentTermsListUI paymentTermsListUI) { try { DataTable dtb = paymentTermsListBAL.GetPaymentTermsListBySearchParameters(this.paymentTermsListUI); 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_Accounts_Payable_Supplier_Master_Creation_PaymentTermsList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Accounts_Payable_Supplier_Master_Creation_PaymentTermsList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
private void SearchPaymentTermsList() { try { PaymentTermsListUI paymentTermsListUI = new PaymentTermsListUI(); paymentTermsListUI.Search = txtPaymentTermsSearch.Text; DataTable dtb = paymentTermsListBAL.GetPaymentTermsListBySearchParameters(paymentTermsListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvPaymentTermsSearch.DataSource = dtb; gvPaymentTermsSearch.DataBind(); divPaymentTermsSearchError.Visible = false; } else { divPaymentTermsSearchError.Visible = true; lblPaymentTermsSearchError.Text = Resources.GlobalResource.msgNoRecordFound; gvPaymentTermsSearch.Visible = false; } } catch (Exception exp) { logExcpUIobj.MethodName = "SearchPaymentTermsList()"; logExcpUIobj.ResourceName = "Finance_Accounts_Payable_Non_PO_Based_Invoice_NonPOBasedInvoiceForm.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Accounts_Payable_Non_PO_Based_Invoice_NonPOBasedInvoiceForm : SearchPaymentTermsList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public int DeletePaymentTerms(PaymentTermsListUI paymentTermsListUI) { int result = 0; result = paymentTermsListDAL.DeletePaymentTerms(paymentTermsListUI); return(result); }
public DataTable GetPaymentTermsListBySearchParameters(PaymentTermsListUI paymentTermsListUI) { DataTable dtb = new DataTable(); dtb = paymentTermsListDAL.GetPaymentTermsListBySearchParameters(paymentTermsListUI); return(dtb); }
public DataTable GetPaymentTermsListById(PaymentTermsListUI paymentTermsListUI) { DataTable dtb = new DataTable(); dtb = paymentTermsListDAL.GetPaymentTermsListById(paymentTermsListUI); return(dtb); }
public DataTable GetPaymentTermsListBySearchParameters(PaymentTermsListUI paymentTermsListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_PaymentTerms_SelectBySearchParameters", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@Search", SqlDbType.NVarChar); sqlCmd.Parameters["@Search"].Value = paymentTermsListUI.Search; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "GetPaymentTermsListBySearchParameters()"; logExcpUIobj.ResourceName = "PaymentTermsListDAL.CS"; logExcpUIobj.RecordId = "Search = " + paymentTermsListUI.Search; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[PaymentTermsListDAL : GetPaymentTermsListBySearchParameters] An error occured in the processing of Record Search = " + paymentTermsListUI.Search + " . Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeletePaymentTerms(PaymentTermsListUI paymentTermsListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_PaymentTerms_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_PaymentTermsId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_PaymentTermsId"].Value = paymentTermsListUI.Tbl_PaymentTermsId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeletePaymentTerms()"; logExcpUIobj.ResourceName = "PaymentTermsListDAL.CS"; logExcpUIobj.RecordId = paymentTermsListUI.Tbl_PaymentTermsId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[PaymentTermsListDAL : DeletePaymentTerms] An error occured in the processing of Record Id : " + paymentTermsListUI.Tbl_PaymentTermsId + ". Details : [" + exp.ToString() + "]"); } return(result); }