Ejemplo n.º 1
0
 private void bunifuCustomDataGrid1_DoubleClick(object sender, EventArgs e)
 {
     //PL.showInvoice frm = new showInvoice();
     PL.updateInvoice frm = new updateInvoice();
     frm.id = Convert.ToInt32(this.invoDataGrid1.CurrentRow.Cells[0].Value);
     frm.ShowDialog();
 }
        private void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            if (State == "RetrievalMaterials")
            {
                try
                {
                    PL.updateInvoice frm = new updateInvoice(this.dataGridView1.CurrentRow.Cells[7].Value.ToString());
                    frm.id = Convert.ToInt32(this.dataGridView1.CurrentRow.Cells[0].Value);
                    frm.ShowDialog();

                    UpDateInfo();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
                try
                {
                    PL.showInvoice frm = new showInvoice();
                    frm.id                     = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);
                    frm.txtName.Text           = dataGridView1.CurrentRow.Cells[3].Value.ToString();
                    frm.txtNote.Text           = dataGridView1.CurrentRow.Cells[2].Value.ToString();
                    frm.txtID.Text             = dataGridView1.CurrentRow.Cells[0].Value.ToString();
                    frm.txtTotal.Text          = dataGridView1.CurrentRow.Cells[4].Value.ToString();
                    frm.txtAmountReceived.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString();
                    frm.ShowDialog();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }