Ejemplo n.º 1
0
        private void btnAddProd_Click(object sender, EventArgs e)
        {
            addSupProd addSup = new addSupProd();

            addSup.user_id = user_id;
            addSup.ShowDialog();
            show();
        }
Ejemplo n.º 2
0
        private void btnUpd_Click(object sender, EventArgs e)
        {
            int RowIndex = dgvSupplies.CurrentCell.RowIndex;

            if (RowIndex >= 0)
            {
                addSupProd addSup = new addSupProd();
                addSup.user_id = user_id;
                int    id;
                string code, des, up, qty;
                id   = int.Parse(dgvSupplies.Rows[RowIndex].Cells["prod_id"].Value.ToString());
                code = dgvSupplies.Rows[RowIndex].Cells["code"].Value.ToString();
                des  = dgvSupplies.Rows[RowIndex].Cells["des"].Value.ToString();
                up   = dgvSupplies.Rows[RowIndex].Cells["unit_price"].Value.ToString();
                qty  = dgvSupplies.Rows[RowIndex].Cells[4].Value.ToString();;
                addSup.edit(id, code, des, up, qty);
                addSup.ShowDialog();
                show();
                dgvSupplies.Rows[RowIndex].Selected = true;
            }
        }