public int DeleteFiscalPeriod(FiscalPeriodListUI fiscalPeriodListUI) { int result = 0; result = fiscalPeriodListDAL.DeleteFiscalPeriod(fiscalPeriodListUI); return(result); }
private void BindListBySearchParameters(FiscalPeriodListUI fiscalPeriodListUI) { try { DataTable dtb = fiscalPeriodListBAL.GetFiscalPeriodListBySearchParameters(this.fiscalPeriodListUI); 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 = "Reporting_Balance_Sheet_Supplier_Masters_FiscalPeriodList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Reporting_Balance_Sheet_Supplier_Masters_FiscalPeriodList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetFiscalPeriodListBySearchParameters(FiscalPeriodListUI fiscalPeriodListUI) { DataTable dtb = new DataTable(); dtb = fiscalPeriodListDAL.GetFiscalPeriodListBySearchParameters(fiscalPeriodListUI); return(dtb); }
public DataTable GetFiscalPeriodListById(FiscalPeriodListUI fiscalPeriodListUI) { DataTable dtb = new DataTable(); dtb = fiscalPeriodListDAL.GetFiscalPeriodListById(fiscalPeriodListUI); return(dtb); }
private void SearchFiscalPeriodList() { try { FiscalPeriodListBAL fiscalPeriodListBAL = new FiscalPeriodListBAL(); FiscalPeriodListUI fiscalPeriodListUI = new FiscalPeriodListUI(); fiscalPeriodListUI.Search = txtFiscalPeriodSearch.Text; DataTable dtb = fiscalPeriodListBAL.GetFiscalPeriodListBySearchParameters(fiscalPeriodListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvFiscalPeriodSearch.DataSource = dtb; gvFiscalPeriodSearch.DataBind(); divFiscalPeriodSearchError.Visible = false; } else { divFiscalPeriodSearchError.Visible = true; lblFiscalPeriodSearchError.Text = Resources.GlobalResource.msgNoRecordFound; gvFiscalPeriodSearch.Visible = false; } } catch (Exception exp) { logExcpUIobj.MethodName = "SearchFiscalPeriodList()"; logExcpUIobj.ResourceName = "Finance_General_Ledger_GL_Integration_GLAccountSummaryForm.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_General_Ledger_GL_Integration_GLAccountSummaryForm : SearchFiscalPeriodList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetFiscalPeriodListById(FiscalPeriodListUI fiscalPeriodListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_FiscalPeriod_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_FiscalPeriodId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_FiscalPeriodId"].Value = fiscalPeriodListUI.Tbl_FiscalPeriodId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getFiscalPeriodListById()"; logExcpUIobj.ResourceName = "FiscalPeriodListDAL.CS"; logExcpUIobj.RecordId = fiscalPeriodListUI.Tbl_FiscalPeriodId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[FiscalPeriodListDAL : getFiscalPeriodListById] An error occured in the processing of Record Id : " + fiscalPeriodListUI.Tbl_FiscalPeriodId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeleteFiscalPeriod(FiscalPeriodListUI fiscalPeriodListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_FiscalPeriod_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_FiscalPeriodId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_FiscalPeriodId"].Value = fiscalPeriodListUI.Tbl_FiscalPeriodId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeleteFiscalPeriod()"; logExcpUIobj.ResourceName = "FiscalPeriodListDAL.CS"; logExcpUIobj.RecordId = fiscalPeriodListUI.Tbl_FiscalPeriodId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[FiscalPeriodListDAL : DeleteFiscalPeriod] An error occured in the processing of Record Id : " + fiscalPeriodListUI.Tbl_FiscalPeriodId + ". Details : [" + exp.ToString() + "]"); } return(result); }