public override void New(object sender, EventArgs e) { DefectiveTypeAdd dfrm = new DefectiveTypeAdd(DefectiveTypeAdd.EditMode.Insert, null); if (dfrm.ShowDialog() == DialogResult.OK) { RefreshClicked(); } }
public override void Modify(object sender, EventArgs e) { if (dgvDefectiveType.SelectedRows.Count > 0) { DefectiveTypeVO vo = new DefectiveTypeVO { DefecID = dgvDefectiveType.SelectedRows[0].Cells[0].Value.ToString(), DefecName = dgvDefectiveType.SelectedRows[0].Cells[1].Value.ToString(), DefecExplain = dgvDefectiveType.SelectedRows[0].Cells[2].Value.ToString() }; DefectiveTypeAdd dfrm = new DefectiveTypeAdd(DefectiveTypeAdd.EditMode.Update, vo); if (dfrm.ShowDialog() == DialogResult.OK) { RefreshClicked(); } } else { frm.NoticeMessage = Resources.ModDefectiveTypeError; } }