private void CbItemTypes_SelectedIndexChanged(object sender, EventArgs e)
        {
            SQLclass  sQLclass = new SQLclass();
            DataTable dt       = sQLclass.GetAllTypeItems(cbItemTypes.SelectedValue.ToString());

            dgvItems.DataSource = dt;
        }
Example #2
0
        private void InventoryHistory_Load(object sender, EventArgs e)
        {
            SQLclass  sQLclass = new SQLclass();
            DataTable dt       = sQLclass.GetInventoryHistory();

            dgvHistory.DataSource = dt;
        }
Example #3
0
        private void refreshGrid()
        {
            SQLclass  sQLclass = new SQLclass();
            DataTable dt       = sQLclass.GetAllItems();

            dgvItems.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";
        }
        private void BtnRemove_Click(object sender, EventArgs e)
        {
            SQLclass sQLclass = new SQLclass();

            sQLclass.RemoveItem(Int32.Parse(dgvItems.SelectedRows[0].Cells[0].Value.ToString()));
            refreshGrid();

            MessageBox.Show("Item removed");
        }
Example #6
0
        private void BtnModify_Click(object sender, EventArgs e)
        {
            SQLclass sQLclass = new SQLclass();

            sQLclass.ModifyItemQuantity(tbItemId.Text, Int32.Parse(tbQuantity.Text));

            tbItemId.Text   = "";
            tbQuantity.Text = "";

            refreshGrid();
        }
Example #7
0
        private void BtnAddItem_Click(object sender, EventArgs e)
        {
            SQLclass sQLclass = new SQLclass();

            sQLclass.AddItem(tbItem.Text, cbType.SelectedValue.ToString(), Int32.Parse(tbQuantity.Text));

            MessageBox.Show(tbItem.Text + " Added");

            tbItem.Text     = "";
            tbQuantity.Text = "";
        }
Example #8
0
        private void BtnAddItemType_Click(object sender, EventArgs e)
        {
            SQLclass sQLclass = new SQLclass();

            sQLclass.AddItemType(tbItemType.Text, tbDescription.Text);

            MessageBox.Show("Item Type Added");
            refreshgrid();

            tbItemType.Text    = "";
            tbDescription.Text = "";
        }
Example #9
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;
        }