예제 #1
0
        private void dataGridSale_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            string colname = dataGridSaleHistory.Columns[e.ColumnIndex].Name;

            if (colname == "colCancel")
            {
                frmCancelDetails f = new frmCancelDetails(this);
                f.txtID.Text          = dataGridSaleHistory.Rows[e.RowIndex].Cells[1].Value.ToString();
                f.txtTransno.Text     = dataGridSaleHistory.Rows[e.RowIndex].Cells[2].Value.ToString();
                f.txtPcode.Text       = dataGridSaleHistory.Rows[e.RowIndex].Cells[3].Value.ToString();
                f.txtDescription.Text = dataGridSaleHistory.Rows[e.RowIndex].Cells[4].Value.ToString();
                f.txtPrice.Text       = dataGridSaleHistory.Rows[e.RowIndex].Cells[5].Value.ToString();
                f.txtQty.Text         = dataGridSaleHistory.Rows[e.RowIndex].Cells[6].Value.ToString();
                f.txtDiscount.Text    = dataGridSaleHistory.Rows[e.RowIndex].Cells[7].Value.ToString();
                f.txtTotal.Text       = dataGridSaleHistory.Rows[e.RowIndex].Cells[8].Value.ToString();

                f.txtCancel.Text = suser;
                f.ShowDialog();
            }
        }
예제 #2
0
 public frmVoid(frmCancelDetails frm)
 {
     InitializeComponent();
     cn = new SqlConnection(dbcon.MyConnection());
     f  = frm;
 }