private void btnUpdate_Click(object sender, EventArgs e) { int selectedrowindex = bunifuCustomDataGrid1.SelectedCells[0].RowIndex; DataGridViewRow selectedRow = bunifuCustomDataGrid1.Rows[selectedrowindex]; Repair rp = new Repair(); rp.RepairCode = Convert.ToString(selectedRow.Cells[0].Value); rp.ErrorCode = Convert.ToString(selectedRow.Cells[1].Value); rp.JobStatus = (rbFinished.Checked) ? "Finished" : "Pending"; RepairController rc = new RepairController(); if (rc.updateJbStatus(rp)) { MyDialog.Show("Success...!", "Status updated"); } else { MyDialog.Show("Error...!", "Status not updated"); } checkForErrors(tbxSearchBox.Text, (cmbFilter.SelectedIndex == 0)); }
public repair_details() { InitializeComponent(); rc = new RepairController(); }
public add_repair_types() { InitializeComponent(); rc = new RepairController(); }
public update_job_status() { InitializeComponent(); rc = new RepairController(); }