/// <summary> /// Function to fill Invoice No combobox corresponding to voucher type /// </summary> /// <param name="decLedger"></param> /// <param name="decvoucherTypeId"></param> public void InvoiceNoComboFill(decimal decLedger, decimal decvoucherTypeId) { DataTable dtblInvoiceNo = new DataTable(); PurchaseMasterSP SPPurchaseMaster = new PurchaseMasterSP(); try { isInvoiceFil = true; dtblInvoiceNo = SPPurchaseMaster.GetInvoiceNoCorrespondingtoLedger(decLedger, 0, decvoucherTypeId); cmbInvoiceNo.DataSource = dtblInvoiceNo; if (cmbInvoiceNo.DataSource != null) { cmbInvoiceNo.DisplayMember = "invoiceNo"; cmbInvoiceNo.ValueMember = "purchaseMasterId"; cmbInvoiceNo.SelectedIndex = -1; } isInvoiceFil = false; } catch (Exception ex) { MessageBox.Show("PR:05" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }