private void BindListBySearchParameters(GLAccountFormatListUI gLAccountFormatListUI) { try { DataTable dtb = gLAccountFormatListBAL.GetGLAccountFormatListBySearchParameters(this.gLAccountFormatListUI); 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_GLAccountFormatList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[System_Settings_GLAccountFormatList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetGLAccountFormatListById(GLAccountFormatListUI gLAccountFormatListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("[SP_GLAccountFormat_SelectById]", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_GLAccountFormatId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_GLAccountFormatId"].Value = gLAccountFormatListUI.Tbl_GLAccountFormatId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getGLAccountFormatListById()"; logExcpUIobj.ResourceName = "GLAccountFormatListDAL.CS"; logExcpUIobj.RecordId = gLAccountFormatListUI.Tbl_GLAccountFormatId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[GLAccountFormatListDAL : getGLAccountFormatListById] An error occured in the processing of Record Id : " + gLAccountFormatListUI.Tbl_GLAccountFormatId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeleteGLAccountFormat(GLAccountFormatListUI gLAccountFormatListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_GLAccountFormat_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_GLAccountFormatId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_GLAccountFormatId"].Value = gLAccountFormatListUI.Tbl_GLAccountFormatId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeleteGLAccountFormat()"; logExcpUIobj.ResourceName = "GLAccountFormatListDAL.CS"; logExcpUIobj.RecordId = gLAccountFormatListUI.Tbl_GLAccountFormatId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[GLAccountFormatListDAL : DeleteGLAccountFormat] An error occured in the processing of Record Id : " + gLAccountFormatListUI.Tbl_GLAccountFormatId + ". Details : [" + exp.ToString() + "]"); } return(result); }
public int DeleteGLAccountFormat(GLAccountFormatListUI gLAccountFormatListUI) { int result = 0; result = gLAccountFormatListDAL.DeleteGLAccountFormat(gLAccountFormatListUI); return result; }
public DataTable GetGLAccountFormatListBySearchParameters(GLAccountFormatListUI gLAccountFormatListUI) { DataTable dtb = new DataTable(); dtb = gLAccountFormatListDAL.GetGLAccountFormatListBySearchParameters(gLAccountFormatListUI); return dtb; }
public DataTable GetGLAccountFormatListById(GLAccountFormatListUI gLAccountFormatListUI) { DataTable dtb = new DataTable(); dtb = gLAccountFormatListDAL.GetGLAccountFormatListById(gLAccountFormatListUI); return dtb; }