예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            FORM_ADD_PRODUCT frm = new FORM_ADD_PRODUCT();

            frm.ShowDialog();
            frm.txtRef.Focus();
        }
예제 #2
0
        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();
        }