示例#1
0
        /// <summary>
        /// Function to view all VoucherTypeName For ComboFill based on parameter
        /// </summary>
        /// <param name="decVoucherTypeId"></param>
        /// <returns></returns>
        public List <DataTable> VoucherTypeNameViewAllForComboFill(decimal decVoucherTypeId)
        {
            List <DataTable> listObj = new List <DataTable>();

            try
            {
                listObj = spVoucherType.VoucherTypeNameViewAllForComboFill(decVoucherTypeId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("VT24:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(listObj);
        }
示例#2
0
        /// <summary>
        /// Function to fill VoucherType name combobox
        /// </summary>
        public void VoucherTypeNameComboFill()
        {
            try
            {
                VoucherTypeSP SpVoucherType    = new VoucherTypeSP();
                DataTable     dtbl             = new DataTable();
                decimal       decVoucherTypeId = 0;
                decVoucherTypeId = Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString());
                dtbl             = SpVoucherType.VoucherTypeNameViewAllForComboFill(decVoucherTypeId);
                DataRow dr = dtbl.NewRow();
                dr[0] = 0;
                dr[1] = "All";
                dtbl.Rows.InsertAt(dr, 0);

                cmbVoucherTypeName.DisplayMember = "voucherTypeName";
                cmbVoucherTypeName.ValueMember   = "voucherTypeId";
                cmbVoucherTypeName.DataSource    = dtbl;
                cmbVoucherTypeName.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                MessageBox.Show("AB2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }