Пример #1
0
        public override void New(object sender, EventArgs e)
        {
            DefectiveHandleAdd dfrm = new DefectiveHandleAdd(DefectiveHandleAdd.EditMode.Insert, null);

            if (dfrm.ShowDialog() == DialogResult.OK)
            {
                RefreshClicked();
            }
        }
Пример #2
0
 public override void Modify(object sender, EventArgs e)
 {
     if (dgvDefectiveHandle.SelectedRows.Count > 0)
     {
         DefectiveHandleVO vo = new DefectiveHandleVO {
             HandleID = dgvDefectiveHandle.SelectedRows[0].Cells[0].Value.ToString(), HandleName = dgvDefectiveHandle.SelectedRows[0].Cells[1].Value.ToString(), HandleExplain = dgvDefectiveHandle.SelectedRows[0].Cells[2].Value.ToString()
         };
         DefectiveHandleAdd dfrm = new DefectiveHandleAdd(DefectiveHandleAdd.EditMode.Update, vo);
         if (dfrm.ShowDialog() == DialogResult.OK)
         {
             RefreshClicked();
         }
     }
     else
     {
         frm.NoticeMessage = Resources.ModDefectiveHandleError;
     }
 }