public override async Task <bool> BeforePageClose()
        {
            if (!IsBackVisible)
            {
                return(false);
            }

            if (IsShowListMode)
            {
                return(true);
            }
            else
            {
                var patientOrderItemsJson = JsonConvert.SerializeObject(PatientOrderItems);
                if (patientOrderItemsJson != PatientOrderItemsJson0)
                {
                    if (!await UIFunc.ConfirmAsync(U.CloseWithoutSaving))
                    {
                        return(false);
                    }
                }

                return(true);
            }
        }
Esempio n. 2
0
        public override async Task <bool> BeforePageClose()
        {
            if (isLogoutClose)
            {
                return(true);
            }

            if (!await UIFunc.ConfirmAsync("Exit from application?"))
            {
                return(false);
            }

            UIFunc.ExitApp();
            return(false);
        }
        public async Task PatientDelete()
        {
            if (SelectedPatientOrderItem == null)
            {
                return;
            }
            if (!await UIFunc.ConfirmAsync($"Delete row \"{SelectedPatientOrderItem.Patient.FullPatientName}\"?"))
            {
                return;
            }

            await Delete();

            //PatientOrderItems.Remove(SelectedPatientOrderItem);
            //SelectedPatientOrderItem = PatientOrderItems.FirstOrDefault();
            //CalcAll();
        }
Esempio n. 4
0
        async Task Logout()
        {
            if (!await UIFunc.ConfirmAsync("Logout?"))
            {
                return;
            }

            isLogoutClose = true;
            var ret = await NavFunc.PopToRootAsync();

            isLogoutClose = false;

            if (!ret)
            {
                return;
            }

            UserOptions.Clear();
            var model = new LoginViewModel();
            await NavFunc.NavigateToAsync(model);
        }