public DataTable GetBudgetListBySearchParameters(BudgetDetailsListUI budgetDetailsListUI) { DataTable dtb = new DataTable(); dtb = budgetDetailsListDAL.GetBudgetDetailsListBySearchParameters(budgetDetailsListUI); return(dtb); }
public int DeleteBudgetDetails(BudgetDetailsListUI budgetDetailsListUI) { int result = 0; result = budgetDetailsListDAL.DeleteBudgetDetails(budgetDetailsListUI); return(result); }
public DataTable GetBudgetDetailsListById(BudgetDetailsListUI budgetDetailsListUI) { DataTable dtb = new DataTable(); dtb = budgetDetailsListDAL.GetBudgetDetailsListById(budgetDetailsListUI); return(dtb); }
private void BindListBySearchParameters(BudgetDetailsListUI budgetDetailsListUI) { try { DataTable dtb = budgetDetailsListBAL.GetBudgetListBySearchParameters(budgetDetailsListUI); 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 = "System_Settings_CountryList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[System_Settings_BudgetDetailsList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetBudgetDetailsListById(BudgetDetailsListUI budgetDetailsListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_BudgetDetails_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_BudgetDetailsId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_BudgetDetailsId"].Value = budgetDetailsListUI.Tbl_BudgetDetailsId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getBudgetDetailsListById()"; logExcpUIobj.ResourceName = "BudgetDetailsListDAL.CS"; logExcpUIobj.RecordId = budgetDetailsListUI.Tbl_BudgetDetailsId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[BudgetDetailsListDAL : getBudgetDetailsListById] An error occured in the processing of Record Id : " + budgetDetailsListUI.Tbl_BudgetDetailsId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeleteBudgetDetails(BudgetDetailsListUI budgetDetailsListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_BudgetDetails_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_BudgetDetailsId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_BudgetDetailsId"].Value = budgetDetailsListUI.Tbl_BudgetDetailsId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeleteBudgetDetails()"; logExcpUIobj.ResourceName = "BudgetDetailsListDAL.CS"; logExcpUIobj.RecordId = budgetDetailsListUI.Tbl_BudgetDetailsId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[BudgetDetailsListDAL : DeleteBudgetDetails] An error occured in the processing of Record Id : " + budgetDetailsListUI.Tbl_BudgetDetailsId + ". Details : [" + exp.ToString() + "]"); } return(result); }