Beispiel #1
0
        private void refreshgrid()
        {
            SQLclass  sQLclass = new SQLclass();
            DataTable dt       = sQLclass.GetAllItemsTypes();

            dgvItemType.DataSource = dt;
        }
        private void InventoryCheckItems_Load(object sender, EventArgs e)
        {
            SQLclass  sQLclass = new SQLclass();
            DataTable dt       = sQLclass.GetAllItemsTypes();

            cbItemTypes.DataSource    = dt;
            cbItemTypes.ValueMember   = "Type";
            cbItemTypes.DisplayMember = "Description";
        }
Beispiel #3
0
        private void InventoryAdd_Load(object sender, EventArgs e)
        {
            SQLclass  sQLclass = new SQLclass();
            DataTable dt       = sQLclass.GetAllItemsTypes();

            if (dt.Rows.Count == 0)
            {
                MessageBox.Show("No item types found. Add item types first before adding items");
                this.Close();
            }

            cbType.DataSource    = dt;
            cbType.ValueMember   = "Type";
            cbType.DisplayMember = "Description";

            AcceptButton = btnAddItem;
        }