private void dataGridSoldItems_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            String colName = dataGridSoldItems.Columns[e.ColumnIndex].Name;

            if (colName == "Cancel")
            {
                frmcancelSales cancel = new frmcancelSales(this);
                cancel.txtId.Text           = dataGridSoldItems.Rows[e.RowIndex].Cells[0].Value.ToString();
                cancel.txttransactioNo.Text = dataGridSoldItems.Rows[e.RowIndex].Cells[1].Value.ToString();
                cancel.txtpcode.Text        = dataGridSoldItems.Rows[e.RowIndex].Cells[2].Value.ToString();
                cancel.txtdescription.Text  = dataGridSoldItems.Rows[e.RowIndex].Cells[3].Value.ToString();
                cancel.txtprice.Text        = dataGridSoldItems.Rows[e.RowIndex].Cells[4].Value.ToString();
                cancel.txtqty.Text          = dataGridSoldItems.Rows[e.RowIndex].Cells[5].Value.ToString();
                cancel.txtdiscount.Text     = dataGridSoldItems.Rows[e.RowIndex].Cells[6].Value.ToString();
                cancel.txttotal.Text        = dataGridSoldItems.Rows[e.RowIndex].Cells[7].Value.ToString();

                cancel.txtcancelledBy.Text = username.Text;

                cancel.Show();
            }
        }
Beispiel #2
0
 public frmVoid(frmcancelSales cancel)
 {
     InitializeComponent();
     Region      = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
     cancelSales = cancel;
 }