Exemple #1
0
        private void updateBtn_Click(object sender, EventArgs e)
        {
            DataGridViewRow row = dataGridViewProducts.CurrentRow;
            Products        pro = new Products();

            pro.Name         = row.Cells["name"].Value.ToString();
            pro.Brand        = row.Cells["brand"].Value.ToString();
            pro.Item_Price   = Convert.ToDouble(row.Cells["item_price"].Value.ToString());
            pro.StokType     = row.Cells["stock_type"].Value.ToString();
            pro.Stock_Amount = Convert.ToDouble(row.Cells["stock_amount"].Value.ToString());
            pro.ID           = row.Index + 1;
            AddUpdateForm addUpdate = new AddUpdateForm(pro);

            addUpdate.ShowDialog();
        }
Exemple #2
0
        private void updateBtn_Click(object sender, EventArgs e)
        {
            AddUpdateForm addUpdate = new AddUpdateForm();

            addUpdate.ShowDialog();
        }