private void BindListBySearchParameters(PODetailsListUI pODetailsListUI) { try { DataTable dtb = pODetailsListBAL.GetPODetailsListBySearchParameters(this.pODetailsListUI); 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_PO_PODetailsList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Accounts_Payable_PO_PODetailsList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public int DeletePODetails(PODetailsListUI pODetailsListUI) { int result = 0; result = pODetailsListDAL.DeletePODetails(pODetailsListUI); return(result); }
public DataTable GetPODetailsListBySearchParameters(PODetailsListUI pODetailsListUI) { DataTable dtb = new DataTable(); dtb = pODetailsListDAL.GetPODetailsListBySearchParameters(pODetailsListUI); return(dtb); }
public DataTable GetPODetailsListById(PODetailsListUI pODetailsListUI) { DataTable dtb = new DataTable(); dtb = pODetailsListDAL.GetPODetailsListById(pODetailsListUI); return(dtb); }
public DataTable GetPODetailsListById(PODetailsListUI pODetailsListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_PODetails_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_PODetailsId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_PODetailsId"].Value = pODetailsListUI.Tbl_PODetailsId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getPODetailsListById()"; logExcpUIobj.ResourceName = "PODetailsListDAL.CS"; logExcpUIobj.RecordId = pODetailsListUI.Tbl_PODetailsId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[PODetailsListDAL : getPODetailsListById] An error occured in the processing of Record Id : " + pODetailsListUI.Tbl_PODetailsId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeletePODetails(PODetailsListUI pODetailsListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_PODetails_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_PODetailsId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_PODetailsId"].Value = pODetailsListUI.Tbl_PODetailsId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeletePODetails()"; logExcpUIobj.ResourceName = "PODetailsListDAL.CS"; logExcpUIobj.RecordId = pODetailsListUI.Tbl_PODetailsId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[PODetailsListDAL : DeletePODetails] An error occured in the processing of Record Id : " + pODetailsListUI.Tbl_PODetailsId + ". Details : [" + exp.ToString() + "]"); } return(result); }