예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try { اضافه_مندوب sal = new اضافه_مندوب();
           sal.ShowDialog();
           dt = sales.All_sales();
           dataGridView1.DataSource = dt; }
     catch (Exception ex) { MessageBox.Show(ex.Message); }
 }
예제 #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         اضافه_مندوب sal = new اضافه_مندوب();
         sal.button1.Text  = "تعديل";
         sal.textBox1.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString();
         sal.textBox2.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
         sal.textBox3.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString();
         sal.textBox4.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();
         sal.ShowDialog();
         dt = sales.All_sales();
         dataGridView1.DataSource = dt;
     }
     catch (Exception ex) { MessageBox.Show(ex.Message); }
 }