public DataTable GetPONumberListSearchParameters(PONumberListUI pONumberListUI) { DataTable dtb = new DataTable(); dtb = pONumberListDAL.GetPONumberListBySearchParameters(pONumberListUI); return(dtb); }
private void SearchPONumberList() { try { PONumberListUI pONumberListUI = new PONumberListUI(); pONumberListUI.Search = txtPONumberSearch.Text; DataTable dtb = pONumberListBAL.GetPONumberListSearchParameters(pONumberListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvPONumberSearch.DataSource = dtb; gvPONumberSearch.DataBind(); divPONumberSearchError.Visible = false; } else { divPONumberSearchError.Visible = true; lblPONumberSearchError.Text = Resources.GlobalResource.msgNoRecordFound; gvPONumberSearch.Visible = false; } } catch (Exception exp) { logExcpUIobj.MethodName = "Assets_AssetPurchaseDetails_AssetPurchaseDetailsForm()"; logExcpUIobj.ResourceName = "Assets_Asset_AssetForm.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Assets_AssetPurchaseDetails_AssetPurchaseDetailsForm : SearchPONumberList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetPONumberListById(PONumberListUI pONumberListUI) { DataTable dtb = new DataTable(); dtb = pONumberListDAL.GetPONumberListById(pONumberListUI); return(dtb); }
public DataTable GetPONumberListById(PONumberListUI pONumberListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_PONumber_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_PONumberId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_PONumberId"].Value = pONumberListUI.Tbl_PONumberId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "GetPONumberListById()"; logExcpUIobj.ResourceName = "PONumberListDAL.CS"; logExcpUIobj.RecordId = pONumberListUI.Tbl_PONumberId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[PONumberListDAL : GetPONumberListById] An error occured in the processing of Record Id : " + pONumberListUI.Tbl_PONumberId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }