private void BindListBySearchParameters(CustomerInvoiceProcessListUI customerInvoiceProcessListUI) { try { DataTable dtb = customerInvoiceProcessListBAL.GetCustomerInvoiceProcessListBySearchParameters(customerInvoiceProcessListUI); 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_Receivable_Customer_Invoice_Processing__Services_CustomerInvoiceProcessList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Accounts_Receivable_Customer_Invoice_Processing__Services_CustomerInvoiceProcessList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
private void SearchCustomerInvoiceProcessList() { try { CustomerInvoiceProcessListUI customerInvoiceProcessListUI = new CustomerInvoiceProcessListUI(); customerInvoiceProcessListUI.Search = txtCustomerInvoiceProcessSearch.Text; DataTable dtb = customerInvoiceProcessListBAL.GetCustomerInvoiceProcessListBySearchParameters(customerInvoiceProcessListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvCustomerInvoiceProcessSearch.DataSource = dtb; gvCustomerInvoiceProcessSearch.DataBind(); divCustomerInvoiceProcessSearchError.Visible = false; } else { divCustomerInvoiceProcessSearchError.Visible = true; lblCustomerInvoiceProcessSearchError.Text = Resources.GlobalResource.msgNoRecordFound; gvCustomerInvoiceProcessSearch.Visible = false; } } catch (Exception exp) { logExcpUIobj.MethodName = "SearchCustomerInvoiceProcessList()"; logExcpUIobj.ResourceName = "Finance_Bank_Accounting_Customer_Down_Payment_Default.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_Default : SearchCustomerInvoiceProcessList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public int DeleteCustomerInvoiceProcess(CustomerInvoiceProcessListUI customerInvoiceProcessListUI) { int result = 0; result = customerInvoiceProcessListDAL.DeleteCustomerInvoiceProcess(customerInvoiceProcessListUI); return(result); }
public DataTable GetCustomerInvoiceProcessListBySearchParameters(CustomerInvoiceProcessListUI customerInvoiceProcessListUI) { DataTable dtb = new DataTable(); dtb = customerInvoiceProcessListDAL.GetCustomerInvoiceProcessListBySearchParameters(customerInvoiceProcessListUI); return(dtb); }
public DataTable GetCustomerInvoiceProcessListById(CustomerInvoiceProcessListUI customerInvoiceProcessListUI) { DataTable dtb = new DataTable(); dtb = customerInvoiceProcessListDAL.GetCustomerInvoiceProcessListById(customerInvoiceProcessListUI); return(dtb); }
public DataTable GetCustomerInvoiceProcessListById(CustomerInvoiceProcessListUI customerInvoiceProcessListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_CustomerInvoiceProcess_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_CustomerInvoiceProcessId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_CustomerInvoiceProcessId"].Value = customerInvoiceProcessListUI.Tbl_CustomerInvoiceProcessId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getCustomerInvoiceProcessListById()"; logExcpUIobj.ResourceName = "CustomerInvoiceProcessListDAL.CS"; logExcpUIobj.RecordId = customerInvoiceProcessListUI.Tbl_CustomerInvoiceProcessId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[CustomerInvoiceProcessListDAL : getCustomerInvoiceProcessListById] An error occured in the processing of Record Id : " + customerInvoiceProcessListUI.Tbl_CustomerInvoiceProcessId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeleteCustomerInvoiceProcess(CustomerInvoiceProcessListUI customerInvoiceProcessListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_CustomerInvoiceProcess_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_CustomerInvoiceProcessId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_CustomerInvoiceProcessId"].Value = customerInvoiceProcessListUI.Tbl_CustomerInvoiceProcessId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeleteCustomerInvoiceProcess()"; logExcpUIobj.ResourceName = "CustomerInvoiceProcessListDAL.CS"; logExcpUIobj.RecordId = customerInvoiceProcessListUI.Tbl_CustomerInvoiceProcessId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[CustomerInvoiceProcessListDAL : DeleteCustomerInvoiceProcess] An error occured in the processing of Record Id : " + customerInvoiceProcessListUI.Tbl_CustomerInvoiceProcessId + ". Details : [" + exp.ToString() + "]"); } return(result); }