private void BarcodeTransDGV_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex >= 0 && e.RowIndex >= 0 && BarcodeTransDGV.Columns[e.ColumnIndex].Name == "Edit Transaction") { DataGridViewRow SelectedDgvr = BarcodeTransDGV.Rows[e.RowIndex]; BarcodeTransaction bt = new BarcodeTransaction(); bt.ID = Int64.Parse(SelectedDgvr.Cells[0].Value.ToString()); bt.ModuleSerialNumber = SelectedDgvr.Cells[1].Value.ToString(); bt.BarcodeReaderSerialNumber = SelectedDgvr.Cells[2].Value.ToString(); if (!string.IsNullOrEmpty(SelectedDgvr.Cells[5].Value.ToString())) { bt.ErrorID = Int32.Parse(SelectedDgvr.Cells[5].Value.ToString()); } else { bt.ErrorID = 0; } BarcodeAdditionForm baf = new BarcodeAdditionForm(this, LoggedInUser, bt); this.Hide(); baf.Show(); } }
private void btn_manual_entry_Click(object sender, EventArgs e) { BarcodeAdditionForm baf = new BarcodeAdditionForm(this, LoggedInUser); this.Hide(); baf.Show(); }