Esempio n. 1
0
        public async void OnLeaveActionOption(ParentStudentLeaveStatus obj)
        {
            var result = await App.Current.MainPage.DisplayActionSheet("Choose what action you take", "Cancel", null, "Approve", "Reject");

            if (result.Equals("Approve"))
            {
            }
            else if (result.Equals("Reject"))
            {
            }
            else
            {
            }
        }
Esempio n. 2
0
        public async void OnApproveCommand(ParentStudentLeaveStatus obj)
        {
            if (rejectcounter == 1 || rejectcounter > 1)
            {
                await App.Current.MainPage.DisplayAlert("HMS", "Rejected leave can't be approve", "OK");
            }
            else if (approvecounter == 1 || approvecounter > 1)
            {
                await App.Current.MainPage.DisplayAlert("HMS", "You Have already approve the leave.", "OK");
            }
            else
            {
                var ans = await App.Current.MainPage.DisplayAlert("HMS", "Do you really want to approve the leave.", "OK", "Cancel");

                if (ans)
                {
                    approvecounter = approvecounter + 1;
                }
            }
        }
        public async void OnLeaveActionOption(ParentStudentLeaveStatus obj)
        {
            LeaveStatusModel leaveStatusModel = new LeaveStatusModel();
            var result = await App.Current.MainPage.DisplayActionSheet("Choose what action you take", "Cancel", null, "Approve", "Reject");

            if (result.Equals("Approve"))
            {
                leaveStatusModel.hostelAdmissionId = hosteladmissionids;
                leaveStatusModel.leaveTypeId       = obj.leaveTypeId;
                leaveStatusModel.isApproved        = "Approved";
                wardenService.ApproveWardLeave(leaveStatusModel);
            }
            else if (result.Equals("Reject"))
            {
                leaveStatusModel.hostelAdmissionId = hosteladmissionids;
                leaveStatusModel.leaveTypeId       = obj.leaveTypeId.ToString();
                leaveStatusModel.isApproved        = "Reject";
                wardenService.ApproveWardLeave(leaveStatusModel);
            }
            else
            {
            }
        }