private void button1_Click(object sender, EventArgs e) { FORM_ADD_PRODUCT frm = new FORM_ADD_PRODUCT(); frm.ShowDialog(); frm.txtRef.Focus(); }
private void button3_Click(object sender, EventArgs e) { FORM_ADD_PRODUCT form = new FORM_ADD_PRODUCT(); form.button1.Visible = false; form.txtRef.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString(); form.txtDes.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString(); form.txtqte.Text = this.dataGridView1.CurrentRow.Cells[5].Value.ToString(); form.txt_P_Price.Text = this.dataGridView1.CurrentRow.Cells[3].Value.ToString(); form.txt_S_price.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString(); form.cmbCategories.Text = this.dataGridView1.CurrentRow.Cells[6].Value.ToString(); form.Text = "Product Update:" + this.dataGridView1.CurrentRow.Cells[1].Value.ToString(); form.btnAdd.Text = "Update"; form.state = "update"; form.txtRef.ReadOnly = true; form.ShowDialog(); }
private void addANewProductToolStripMenuItem_Click(object sender, EventArgs e) { FORM_ADD_PRODUCT frm = new FORM_ADD_PRODUCT(); frm.ShowDialog(); }