private void BindListBySearchParameters(SupplierAndGroupAccountListUI supplierAndGroupAccountListUI) { try { DataTable dtb = supplierAndGroupAccountListBAL.GetSupplierAndGroupAccountListBySearchParameters(supplierAndGroupAccountListUI); 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_SupplierAndGroupAccountList.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_SupplierAndGroupAccountList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public int DeleteSupplierAndGroupAccount(SupplierAndGroupAccountListUI supplierAndGroupAccountListUI) { int result = 0; result = supplierAndGroupAccountListDAL.DeleteSupplierAndGroupAccount(supplierAndGroupAccountListUI); return(result); }
public DataTable GetSupplierAndGroupAccountListBySearchParameters(SupplierAndGroupAccountListUI supplierAndGroupAccountListUI) { DataTable dtb = new DataTable(); dtb = supplierAndGroupAccountListDAL.GetSupplierAndGroupAccountListBySearchParameters(supplierAndGroupAccountListUI); return(dtb); }
public DataTable GetSupplierAndGroupAccountListById(SupplierAndGroupAccountListUI supplierAndGroupAccountListUI) { DataTable dtb = new DataTable(); dtb = supplierAndGroupAccountListDAL.GetSupplierAndGroupAccountListById(supplierAndGroupAccountListUI); return(dtb); }
public DataTable GetSupplierAndGroupAccountListById(SupplierAndGroupAccountListUI supplierAndGroupAccountListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_SupplierAndGroupAccount_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_SupplierAndGroupAccountId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_SupplierAndGroupAccountId"].Value = supplierAndGroupAccountListUI.Tbl_SupplierAndGroupAccountId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getSupplierAndGroupAccountListById()"; logExcpUIobj.ResourceName = "SupplierAndGroupAccountListDAL.CS"; logExcpUIobj.RecordId = supplierAndGroupAccountListUI.Tbl_SupplierAndGroupAccountId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[SupplierAndGroupAccountListDAL : getSupplierAndGroupAccountListById] An error occured in the processing of Record Id : " + supplierAndGroupAccountListUI.Tbl_SupplierAndGroupAccountId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeleteSupplierAndGroupAccount(SupplierAndGroupAccountListUI supplierAndGroupAccountListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_SupplierAndGroupAccount_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_SupplierAndGroupAccountId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_SupplierAndGroupAccountId"].Value = supplierAndGroupAccountListUI.Tbl_SupplierAndGroupAccountId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeleteSupplierAndGroupAccount()"; logExcpUIobj.ResourceName = "SupplierAndGroupAccountListDAL.CS"; logExcpUIobj.RecordId = supplierAndGroupAccountListUI.Tbl_SupplierAndGroupAccountId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[SupplierAndGroupAccountListDAL : DeleteSupplierAndGroupAccount] An error occured in the processing of Record Id : " + supplierAndGroupAccountListUI.Tbl_SupplierAndGroupAccountId + ". Details : [" + exp.ToString() + "]"); } return(result); }