Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            type = "Add";
            Add_SaleBill a = new Add_SaleBill();

            a.ShowDialog();
            initialize();
            refreshdata();
        }
Ejemplo n.º 2
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 4)
     {
         id    = Convert.ToInt32(dataGridView1.CurrentRow.Cells[1].Value.ToString());
         Party = dataGridView1.CurrentRow.Cells[2].Value.ToString();
         Date  = dataGridView1.CurrentRow.Cells[0].Value.ToString();
         type  = "Edit";
         Add_SaleBill a = new Add_SaleBill();
         a.Text = "Edit";
         a.ShowDialog();
         initialize();
     }
     if (e.ColumnIndex == 5)
     {
         if (DialogResult.Yes == MessageBox.Show("Do You Want Delete ?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
         {
             sale.DeleteBill(Convert.ToInt32(dataGridView1.CurrentRow.Cells[1].Value.ToString()));
         }
         initialize();
     }
 }