public DataTable GetBudgetListBySearchParameters(BudgetListUI budgetListUI) { DataTable dtb = new DataTable(); dtb = budgetListDAL.GetBudgetListBySearchParameters(budgetListUI); return(dtb); }
public int DeleteBudget(BudgetListUI budgetListUI) { int result = 0; result = budgetListDAL.DeleteBudget(budgetListUI); return(result); }
public DataTable GetBudgetListById(BudgetListUI budgetListUI) { DataTable dtb = new DataTable(); dtb = budgetListDAL.GetBudgetListById(budgetListUI); return(dtb); }
private void SearchBudgetList() { try { BudgetListUI budgetListUI = new BudgetListUI(); budgetListUI.Search = txtBudgetSearch.Text; DataTable dtb = budgetListBAL.GetBudgetListBySearchParameters(budgetListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvBudgetSearch.DataSource = dtb; gvBudgetSearch.DataBind(); divBudgetSearchError.Visible = false; } else { divBudgetSearchError.Visible = true; lblBudgetSearchError.Text = Resources.GlobalResource.msgNoRecordFound; gvBudgetSearch.Visible = false; } } catch (Exception exp) { logExcpUIobj.MethodName = "SearchGLAccountBudgetList()"; logExcpUIobj.ResourceName = "Finance_General_Ledger_GL_Integration_GLAccountBudgetDetailsForm.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_General_Ledger_GL_Integration_GLAccountBudgetDetailsForm : SearchGLAccountBudgetList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
private void BindBudgetListBySearchParameters(BudgetListUI budgetListUI) { try { DataTable dtb = budgetListBAL.GetBudgetListBySearchParameters(budgetListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvData.DataSource = dtb; gvData.DataBind(); divError.Visible = false; } else { divError.Visible = true; lblError.Text = Resources.GlobalResource.msgNoRecordFound; gvData.Visible = false; } } catch (Exception exp) { logExcpUIobj.MethodName = "BindBudgetListBySearchParameters()"; logExcpUIobj.ResourceName = "System_Settings_BudgetList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[System_Settings_BudgetList : BindBudgetListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetBudgetListById(BudgetListUI budgetListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_Budget_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_BudgetId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_BudgetId"].Value = budgetListUI.Tbl_BudgetId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getBudgetListById()"; logExcpUIobj.ResourceName = "BudgetListDAL.CS"; logExcpUIobj.RecordId = budgetListUI.Tbl_BudgetId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[BudgetListDAL : getBudgetListById] An error occured in the processing of Record Id : " + budgetListUI.Tbl_BudgetId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeleteBudget(BudgetListUI budgetListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_Budget_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_BudgetId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_BudgetId"].Value = budgetListUI.Tbl_BudgetId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeleteBudget()"; logExcpUIobj.ResourceName = "BudgetListDAL.CS"; logExcpUIobj.RecordId = budgetListUI.Tbl_BudgetId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[BudgetListDAL : DeleteBudget] An error occured in the processing of Record Id : " + budgetListUI.Tbl_BudgetId + ". Details : [" + exp.ToString() + "]"); } return(result); }