/// <summary> /// Function to fill vouchertype combobox /// </summary> public void VoucherComboFill() { try { VoucherTypeBll BllVoucherType = new VoucherTypeBll(); List<DataTable> listObj = new List<DataTable>(); listObj = BllVoucherType.VoucherTypeViewAllForAgainstBillDetails(); DataRow dr = listObj[0].NewRow(); dr[0] = 0; dr[1] = "All"; listObj[0].Rows.InsertAt(dr, 0); cmbVoucherType.DisplayMember = "typeOfVoucher"; cmbVoucherType.ValueMember = "voucherTypeId"; cmbVoucherType.DataSource = listObj[0]; cmbVoucherType.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show("AB1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }