public DataTable GetPOBasedInvoiceListBySearchParameters(POBasedInvoiceListUI pOBasedInvoiceListUI) { DataTable dtb = new DataTable(); dtb = pOBasedInvoiceListDAL.GetPOBasedInvoiceListBySearchParameters(pOBasedInvoiceListUI); return(dtb); }
public int DeletePOBasedInvoice(POBasedInvoiceListUI pOBasedInvoiceListUI) { int result = 0; result = pOBasedInvoiceListDAL.DeletePOBasedInvoice(pOBasedInvoiceListUI); return(result); }
public DataTable GetPOBasedInvoiceListById(POBasedInvoiceListUI pOBasedInvoiceListUI) { DataTable dtb = new DataTable(); dtb = pOBasedInvoiceListDAL.GetPOBasedInvoiceListById(pOBasedInvoiceListUI); return(dtb); }
private void SearchPOBasedInvoiceList() { try { POBasedInvoiceListUI pOBasedInvoiceListUI = new POBasedInvoiceListUI(); pOBasedInvoiceListUI.Search = txtPOBasedInvoiceSearch.Text; DataTable dtb = pOBasedInvoiceListBAL.GetPOBasedInvoiceListBySearchParameters(pOBasedInvoiceListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvPOBasedInvoiceSearch.DataSource = dtb; gvPOBasedInvoiceSearch.DataBind(); divPOBasedInvoiceSearchError.Visible = false; gvPOBasedInvoiceSearch.Visible = true; } else { divPOBasedInvoiceSearchError.Visible = true; lblPOBasedInvoiceSearchError.Text = Resources.GlobalResource.msgNoRecordFound; gvPOBasedInvoiceSearch.Visible = false; } } catch (Exception exp) { logExcpUIobj.MethodName = "SearchPOBasedInvoiceList()"; logExcpUIobj.ResourceName = "Finance_Accounts_Payable_PO_Based_Invoice_POBasedInvoiceDistributionForm.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Accounts_Payable_PO_Based_Invoice_POBasedInvoiceDistributionForm : SearchPOBasedInvoiceList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
private void BindListBySearchParameters(POBasedInvoiceListUI pOBasedInvoiceListUI) { try { DataTable dtb = pOBasedInvoiceListBAL.GetPOBasedInvoiceListBySearchParameters(this.pOBasedInvoiceListUI); 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_Based_Invoice_POBasedInvoiceList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Accounts_Payable_PO_Based_Invoice_POBasedInvoiceList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetPOBasedInvoiceListById(POBasedInvoiceListUI pOBasedInvoiceListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_POBasedInvoice_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_POBasedInvoiceId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_POBasedInvoiceId"].Value = pOBasedInvoiceListUI.Tbl_POBasedInvoiceId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getPOBasedInvoiceListById()"; logExcpUIobj.ResourceName = "POBasedInvoiceListDAL.CS"; logExcpUIobj.RecordId = pOBasedInvoiceListUI.Tbl_POBasedInvoiceId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[POBasedInvoiceListDAL : getPOBasedInvoiceListById] An error occured in the processing of Record Id : " + pOBasedInvoiceListUI.Tbl_POBasedInvoiceId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeletePOBasedInvoice(POBasedInvoiceListUI pOBasedInvoiceListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_POBasedInvoice_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_POBasedInvoiceId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_POBasedInvoiceId"].Value = pOBasedInvoiceListUI.Tbl_POBasedInvoiceId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeletePOBasedInvoice()"; logExcpUIobj.ResourceName = "POBasedInvoiceListDAL.CS"; logExcpUIobj.RecordId = pOBasedInvoiceListUI.Tbl_POBasedInvoiceId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[POBasedInvoiceListDAL : DeletePOBasedInvoice] An error occured in the processing of Record Id : " + pOBasedInvoiceListUI.Tbl_POBasedInvoiceId + ". Details : [" + exp.ToString() + "]"); } return(result); }