コード例 #1
0
 void Delete()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "Student registration") == DialogResult.Yes)
     {
         if (CheckEmpty())
         {
             using (Students _std = new Students())
             {
                 DeleteImage();
                 _std.Delete(SetupStudentInfo(true), ref MsgReturned);
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Student registration");
             }
             using (Parents parent = new Parents())
             {
                 parent.Delete(SetupParentInfo(true));
             }
             LoadStudentInfo();
         }
         else
         {
             SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.SelectFirst + " delete", "Student registration");
         }
     }
 }