private void warehouseManagementToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WarehouseManagementForm form = new WarehouseManagementForm(null);

            form.ShowDialog();
            loadData();
        }
        private void dgv_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }

            if (dgv.Columns[e.ColumnIndex].Name == "Remove")
            {
                if (Global.ChoiceAlert("Are you sure want to delete this data? This action can't be undone.") == true)
                {
                    int id   = int.Parse(dgv[0, e.RowIndex].Value.ToString());
                    var item = Global.db.OrderItems.Find(id);
                    Global.db.OrderItems.Remove(item);
                    Global.db.SaveChanges();
                    loadData();
                }
            }

            if (dgv.Columns[e.ColumnIndex].Name == "Edit")
            {
                int id   = int.Parse(dgv[0, e.RowIndex].Value.ToString());
                var item = Global.db.OrderItems.Find(id);

                if (item.Order.TransactionTypeID == 1)
                {
                    PurchaseOrderForm purchase = new PurchaseOrderForm(item);
                    purchase.ShowDialog();
                    loadData();
                }
                else if (item.Order.TransactionTypeID == 2)
                {
                    WarehouseManagementForm form = new WarehouseManagementForm(item);
                    form.ShowDialog();
                    loadData();
                }
            }
        }