public List <DataTable> RejectionInRegisterFill(DateTime fromDate, DateTime toDate, decimal decLedgerId, string strVoucherNo, decimal decVoucherTypeId) { List <DataTable> list = new List <DataTable>(); try { list = spRejectionInMaster.RejectionInRegisterFill(fromDate, toDate, decLedgerId, strVoucherNo, decVoucherTypeId); } catch (Exception ex) { MessageBox.Show("RI11:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(list); }
/// <summary> /// Function to fill Datagridview /// </summary> public void RegisterGridFill() { RejectionInMasterSP SpRejectionInMaster = new RejectionInMasterSP(); try { decimal decvouchertypeId = 0; decimal decLedgerId = 0; string strInvoiceNo = string.Empty; strInvoiceNo = (txtRejectionInNo.Text.Trim() == string.Empty) ? string.Empty : txtRejectionInNo.Text; decLedgerId = (cmbCashorParty.SelectedIndex == 0 || cmbCashorParty.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbCashorParty.SelectedValue.ToString()); decvouchertypeId = (cmbVoucherType.SelectedIndex == 0 || cmbVoucherType.SelectedIndex == -1) ? -1 : Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()); DateTime FromDate = this.dtpFromDate.Value; DateTime ToDate = this.dtpToDate.Value; DataTable dtbl = new DataTable(); dgvRejectionInRegister.DataSource = SpRejectionInMaster.RejectionInRegisterFill(FromDate, ToDate, decLedgerId, strInvoiceNo, decvouchertypeId); } catch (Exception ex) { MessageBox.Show("RIRgstr:01" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }