コード例 #1
0
 public async void OnAssignWardenCommand()
 {
     if (string.IsNullOrEmpty(WardenAssignment.employeeId) || WardenAssignment.employeeId.Length == 0)
     {
         await App.Current.MainPage.DisplayAlert("HMS", "Enter Warden name", "OK");
     }
     else if (string.IsNullOrEmpty(WardenAssignment.areaId) || WardenAssignment.areaId.Length == 0)
     {
         await App.Current.MainPage.DisplayAlert("HMS", "Enter Area Name", "OK");
     }
     else if (string.IsNullOrEmpty(WardenAssignment.hostelId) || WardenAssignment.hostelId.Length == 0)
     {
         await App.Current.MainPage.DisplayAlert("HMS", "Enter Hostel Name", "OK");
     }
     else if (string.IsNullOrEmpty(WardenAssignment.hostelAssigned) || WardenAssignment.hostelAssigned.Length == 0)
     {
         await App.Current.MainPage.DisplayAlert("HMS", "Enter Hostel Name Assigned", "OK");
     }
     else
     {
         WardenAssignment.userId = App.userid;
         web.SavewardenAssignment(WardenAssignment);
     }
 }