/// <summary> /// Function to fill VoucherType name combobox /// </summary> public void VoucherTypeNameComboFill() { try { VoucherTypeBll BllVoucherType = new VoucherTypeBll(); List<DataTable> listObj = new List<DataTable>(); decimal decVoucherTypeId = 0; decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()); listObj = BllVoucherType.VoucherTypeNameViewAllForComboFill(decVoucherTypeId); DataRow dr = listObj[0].NewRow(); dr[0] = 0; dr[1] = "All"; listObj[0].Rows.InsertAt(dr, 0); cmbVoucherTypeName.DisplayMember = "voucherTypeName"; cmbVoucherTypeName.ValueMember = "voucherTypeId"; cmbVoucherTypeName.DataSource = listObj[0]; cmbVoucherTypeName.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show("AB2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }