/// <summary> /// To fill the Order combo box based on the sales quotation numbers /// </summary> public void AgainstQuotationComboFill() { try { if (cmbType.SelectedValue.ToString() != "System.Data.DataRowView") { SalesQuotationBll bllQuotation = new SalesQuotationBll(); List<DataTable> ListObj = new List<DataTable>(); ListObj = bllQuotation.GetSalesQuotationNumberCorrespondingToLedgerForDN(Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), Convert.ToDecimal(cmbType.SelectedValue.ToString()), decDelivryNoteIdToEdit); DataRow dr = ListObj[0].NewRow(); dr[0] = 0; dr[1] = string.Empty; ListObj[0].Rows.InsertAt(dr, 0); cmbOrderNo.DataSource = ListObj[0]; if (ListObj[0].Rows.Count > 0) { cmbOrderNo.DisplayMember = "invoiceNo"; cmbOrderNo.ValueMember = "quotationMasterId"; } } } catch (Exception ex) { MessageBox.Show("DN13: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }