public List <DataTable> DeliveryNoteReportGridFill(DateTime fromDate, DateTime toDate, decimal decLedgerId, decimal decSalesMan, string strProdCod, string strVoucherNo, decimal decVoucherTypeId, string strStatus, int inDecimalPlaces, string strDeliveryMode, string strInvoiceNo, decimal decAgainstVoucherTypeId) { List <DataTable> listObj = new List <DataTable>(); try { listObj = spDeliveryNoteMaster.DeliveryNoteReportGridFill(fromDate, toDate, decLedgerId, decSalesMan, strProdCod, strVoucherNo, decVoucherTypeId, strStatus, inDecimalPlaces, strDeliveryMode, strInvoiceNo, decAgainstVoucherTypeId); } catch (Exception ex) { MessageBox.Show("DNBLL:6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listObj); }
/// <summary> /// Function to fill the grid /// </summary> public void GridFill() { decimal decVoucherTypeId = 0; try { DateTime fromDate = this.dtpFromDate.Value; DateTime toDate = this.dtpToDate.Value; string strDeliveryMode = cmbDeliveryMode.Text; string strInvoiceNo = cmbOrderNo.Text; if (cmbCashOrParty.SelectedValue != null && cmbSalesMan.SelectedValue != null) { if (cmbCashOrParty.SelectedValue.ToString() != "System.Data.DataRowView" && cmbSalesMan.SelectedValue.ToString() != "System.Data.DataRowView" && cmbStatus.Text != "") { if (cmbVoucherType.Text == "All") { decVoucherTypeId = 0; } else { decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()); } if (cmbOrderNo.Text == string.Empty) { strInvoiceNo = "0"; } else { strInvoiceNo = cmbOrderNo.Text; } DataTable dtblReport = new DataTable(); dtblReport = spDeliveryNoteMaster.DeliveryNoteReportGridFill(fromDate, toDate, Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), Convert.ToDecimal(cmbSalesMan.SelectedValue.ToString()), txtProductCode.Text, txtVoucherNo.Text, decVoucherTypeId, cmbStatus.Text, PublicVariables._inNoOfDecimalPlaces, strDeliveryMode, strInvoiceNo, Convert.ToDecimal(cmbDeliveryMode.SelectedValue.ToString())); dgvDeliveryNoteReport.DataSource = dtblReport; } } } catch (Exception ex) { MessageBox.Show("DNREP04:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }