Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmProductAdd frm = new frmProductAdd("EDIT");

            //frm.txtID.Enabled  = true;
            frm.txtID.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Product_ID"].Value.ToString().Trim();
            frm.txtProductName.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Product_Name"].Value.ToString().Trim();
            frm.cbbTypeProduct.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Type_ID"].Value.ToString().Trim();
            frm.txtGoodmin.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Good_min"].Value.ToString().Trim();

            frm.ShowDialog();
            btnSearch_Click(sender, e);
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmProductAdd frm = new frmProductAdd("EDIT");

            frm.txtID.Visible = true;
            frm.txtID.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Product_ID"].Value.ToString().Trim();
            frm.txtProductName.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Product_Name"].Value.ToString().Trim();
            frm.txtCost.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Pricebuy"].Value.ToString().Trim();
            frm.txtSele.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Pricesale"].Value.ToString().Trim();
            frm.txtTotal.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Total"].Value.ToString().Trim();
            frm.cbbTypeProduct.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Type_ID"].Value.ToString().Trim();
            frm.cbbDealer.Text = dgvView.Rows[dgvView.CurrentRow.Index].Cells["Dealer_ID"].Value.ToString().Trim();

            frm.ShowDialog();
            btnSearch_Click(sender, e);
        }
Esempio n. 3
0
 private void button5_Click(object sender, EventArgs e)
 {
     var frm = new frmProductAdd("INSERT");
     frm.ShowDialog();
     btnSearch_Click(sender, e);
 }