Example #1
0
 public void Hideorshowbutton(ViewDisciplinaryActionbywarden obj)
 {
     if (_OldDisciplinaryData == obj)
     {
         obj.Isbuttonvisible = !obj.Isbuttonvisible;
         UpdateProduct(obj);
     }
     else
     {
         if (_OldDisciplinaryData != null)
         {
             foreach (var items in DisciplinaryActionbywardens)
             {
                 if (_OldDisciplinaryData.studentName == items.studentName)
                 {
                     _OldDisciplinaryData.Isbuttonvisible = false;
                     UpdateProduct(_OldDisciplinaryData);
                     break;
                 }
             }
         }
         obj.Isbuttonvisible = true;
         UpdateProduct(obj);
     }
     _OldDisciplinaryData = obj;
 }
Example #2
0
        public void UpdateProduct(ViewDisciplinaryActionbywarden obj)
        {
            var index = DisciplinaryActionbywardens.IndexOf(obj);

            DisciplinaryActionbywardens.Remove(obj);
            DisciplinaryActionbywardens.Insert(index, obj);
        }
Example #3
0
 public async void OnTapCommand(ViewDisciplinaryActionbywarden obj)
 {
     Hideorshowbutton(obj);
 }
Example #4
0
 public async void OnDeleteCommand(ViewDisciplinaryActionbywarden obj)
 {
     wardenService.DeleteDisciplinaryActionTaken(obj.wardenDisciplinaryId);
 }
Example #5
0
        public async void OnViewCommand(ViewDisciplinaryActionbywarden obj)
        {
            await App.Current.MainPage.Navigation.PushPopupAsync(new ViewDisciplinaryActionPopup(obj.date, obj.time, obj.studentName, obj.appicationNo, obj.disciplinaryTypeName, obj.discription));

            Hideorshowbutton(obj);
        }
Example #6
0
        public async void OnEditCommand(ViewDisciplinaryActionbywarden obj)
        {
            await App.Current.MainPage.Navigation.PushModalAsync(new EditDisciplinaryAction(obj.disciplinaryTypeName, obj.disciplinaryTypeId, obj.wardenDisciplinaryId, obj.discription, obj.hostelAdmissionId, obj.date, obj.time));

            Hideorshowbutton(obj);
        }