예제 #1
0
 void DeleteTime()
 {
     using (Maintenance maintain = new Maintenance())
     {
         T_RoomTime value = new T_RoomTime();
         value.RoomCode = txtRoomCode.Text;
         maintain.Delete(value);
     }
 }
 void Delete()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "Year class") == DialogResult.Yes && dgYearClass.Rows.Count > 0)
     {
         using (Maintenance _maintain = new Maintenance())
         {
             var value = SetSemester();
             value.ID = Convert.ToInt64(dgYearClass.SelectedRows[0].Cells[0].Value);
             if (value != null)
             {
                 _maintain.Delete(value, ref MsgReturned);
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Year class");
                 GetYearClass();
             }
         }
     }
 }
예제 #3
0
 void Delete()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "course") == DialogResult.Yes && dgCourseProgram.Rows.Count > 0)
     {
         using (Maintenance _maintain = new Maintenance())
         {
             var value = SetCourse();
             value.ID = Convert.ToInt64(dgCourseProgram.SelectedRows[0].Cells[0].Value);
             if (value != null)
             {
                 _maintain.Delete(value, ref MsgReturned);
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Course / Program");
                 LoadCourseProgram();
             }
         }
     }
 }
예제 #4
0
 void Delete()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "Room") == DialogResult.Yes && dgRoom.Rows.Count > 0)
     {
         using (Maintenance _maintain = new Maintenance())
         {
             T_Room value = new T_Room();
             value.ID = Convert.ToInt64(dgRoom.SelectedRows[0].Cells[0].Value);
             if (value != null)
             {
                 _maintain.Delete(value, ref MsgReturned);
                 DeleteRoomDevice(value.RoomCode);
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Room");
                 loadRoom();
                 LoadTime();
                 DeleteTime();
             }
         }
     }
 }
예제 #5
0
 void Delete()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "Year level") == DialogResult.Yes)
     {
         if (!string.IsNullOrWhiteSpace(txtYearLevel.Text))
         {
             T_YearLevel value = new T_YearLevel();
             value.ID = Convert.ToInt64(dgYearLevel.SelectedRows[0].Cells[0].Value.ToString());
             using (Maintenance _maintain = new Maintenance())
             {
                 _maintain.Delete(value, ref MsgReturned);
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Year level");
             }
         }
         else
         {
             SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.SelectFirst + " delete", "Year level");
         }
     }
     LoadYearLevel();
 }
 void Delete()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "Branch building") == DialogResult.Yes)
     {
         if (!string.IsNullOrWhiteSpace(txtBranch.Text) && !string.IsNullOrWhiteSpace(txtBuildingCode.Text) && !string.IsNullOrWhiteSpace(txtName.Text))
         {
             T_BranchBuilding value = new T_BranchBuilding();
             value.ID = Convert.ToInt64(dgBuilding.SelectedRows[0].Cells[0].Value.ToString());
             using (Maintenance _maintain = new Maintenance())
             {
                 _maintain.Delete(value, ref MsgReturned);
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Branch building");
             }
         }
         else
         {
             SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.SelectFirst + " delete", "Branch building");
         }
     }
     LoadBuiding();
 }
예제 #7
0
 void Delete()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "Civil status") == DialogResult.Yes)
     {
         if (!string.IsNullOrWhiteSpace(txtCivilStatus.Text))
         {
             var value = SetCivilStatus();
             value.ID = Convert.ToInt64(dgCivilStatus.SelectedRows[0].Cells[0].Value.ToString());
             using (Maintenance _maintain = new Maintenance())
             {
                 _maintain.Delete(value, ref MsgReturned);
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Civil status");
                 GetCivilStatus();
             }
         }
         else
         {
             SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.SelectFirst + " delete", "Civil status");
         }
     }
 }
 void Delete()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "User registration") == DialogResult.Yes)
     {
         if (CheckEmptyField())
         {
             T_SystemUser user = new T_SystemUser();
             using (Maintenance _maintain = new Maintenance())
             {
                 user.ID = Convert.ToInt64(dgUserRecord.SelectedRows[0].Cells[0].Value.ToString());
                 _maintain.Delete(user, ref MsgReturned);
                 SystemProperties.ShowMessage.MessageWarning(MsgReturned, "User registration");
                 GetUser();
                 SystemProperties.Cleared(this, false, true, true);
                 lblMessage.Text = "";
             }
         }
         else
         {
             SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.SelectFirst + "delete", "User registration");
         }
     }
 }
예제 #9
0
 void Delete()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToDelete, "Position access right") == DialogResult.Yes && dgAccessRightPositionRecord.Rows.Count > 0)
     {
         using (Maintenance _maintain = new Maintenance())
         {
             var value = SetAccessRights();
             value.ID = Convert.ToInt64(dgAccessRightPositionRecord.SelectedRows[0].Cells[0].Value);
             if (value != null)
             {
                 if (CheckAlreadyUser(value.PositionID))
                 {
                     _maintain.Delete(value, ref MsgReturned);
                     SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Position access right");
                     GetAccessRight();
                 }
                 else
                 {
                     SystemProperties.ShowMessage.MessageInformation(SystemProperties.MessageNotification.AlreadyUsed, "Position access right");
                 }
             }
         }
     }
 }