Exemple #1
0
 private void bunifuCustomDataGrid1_DoubleClick(object sender, EventArgs e)
 {
     PL.showInvoice frm = new showInvoice();
     frm.id                     = Convert.ToInt32(bunifuCustomDataGrid1.CurrentRow.Cells[0].Value);
     frm.txtName.Text           = bunifuCustomDataGrid1.CurrentRow.Cells[3].Value.ToString();
     frm.txtNote.Text           = bunifuCustomDataGrid1.CurrentRow.Cells[2].Value.ToString();
     frm.txtID.Text             = bunifuCustomDataGrid1.CurrentRow.Cells[0].Value.ToString();
     frm.txtTotal.Text          = bunifuCustomDataGrid1.CurrentRow.Cells[4].Value.ToString();
     frm.txtAmountReceived.Text = bunifuCustomDataGrid1.CurrentRow.Cells[5].Value.ToString();
     frm.ShowDialog();
 }
Exemple #2
0
 private void dataGridView1_DoubleClick(object sender, EventArgs e)
 {
     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);
     }
 }
        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);
                }
            }
        }