public List <DataTable> DeliveryNoteRegisterGridFillCorrespondingToInvoiceNoAndLedger(string strInvoiceNo, decimal decLdger, DateTime fromDate, DateTime toDate, int inDecimalPlaces) { List <DataTable> listObj = new List <DataTable>(); try { listObj = spDeliveryNoteMaster.DeliveryNoteRegisterGridFillCorrespondingToInvoiceNoAndLedger(strInvoiceNo, decLdger, fromDate, toDate, inDecimalPlaces); } catch (Exception ex) { MessageBox.Show("DNBLL:9" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listObj); }
/// <summary> /// Function to fill Datagridview /// </summary> public void GridFill() { try { DeliveryNoteMasterSP spDeliveryNoteMaster = new DeliveryNoteMasterSP(); if (txtDeliveryNoteNo.Text.Trim() == string.Empty) { strInvoiceNo = string.Empty; } else { strInvoiceNo = txtDeliveryNoteNo.Text; } DateTime FromDate = this.dtpFromDate.Value; DateTime ToDate = this.dtpToDate.Value; DataTable dtblDeryNote = new DataTable(); dtblDeryNote = spDeliveryNoteMaster.DeliveryNoteRegisterGridFillCorrespondingToInvoiceNoAndLedger(strInvoiceNo, Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), FromDate, ToDate, PublicVariables._inNoOfDecimalPlaces); dgvDeliveryNoteRegister.DataSource = dtblDeryNote; } catch (Exception ex) { formMDI.infoError.ErrorString = "DNREG2:" + ex.Message; } }