Пример #1
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 8)
     {
         int row = e.RowIndex;
         if (dataGridView1[2, row].Value.ToString() == "SALE")
         {
             salevoucher s = new salevoucher();
             s.Show();
             s.isexternal();
             s.loadrecord(Convert.ToInt32(dataGridView1[1, row].Value));
         }
         if (dataGridView1[2, row].Value.ToString() == "PURCHASE")
         {
             purchasevoucher s = new purchasevoucher();
             s.Show();
             s.isexternal();
             s.loadrecord(Convert.ToInt32(dataGridView1[1, row].Value));
         }
         if (dataGridView1[2, row].Value.ToString() == "CPV")
         {
             cpvoucher s = new cpvoucher();
             s.Show();
             s.isexternal();
             s.loadrecord(Convert.ToInt32(dataGridView1[1, row].Value));
         }
         if (dataGridView1[2, row].Value.ToString() == "CRV")
         {
             crvoucher s = new crvoucher();
             s.Show();
             s.isexternal();
             s.loadrecord(Convert.ToInt32(dataGridView1[1, row].Value));
         }
     }
 }
Пример #2
0
 private void button4_Click(object sender, EventArgs e)
 {
     this.Hide();
     purchasevoucher pv = new purchasevoucher();
     pv.Show();
 }