async Task OpenPatientOrderItem(PatientOrderItem item) { if (item != null) { SetSelectedPatientOrderItem(item); } var vmodel = new UserOrderViewModel { OrderRowId = this.OrderRowId, IsShowListMode = false, InitSelectedPatientOrderItemRowId = item?.RowId, }; await NavFunc.NavigateToAsync(vmodel); this.SubscribeOnClosed(vmodel, async() => { if (vmodel.IsCommit) { if (!await LoadData()) { return; } CalcAll(); } }); }
async Task ItemOpen(Order item) { SetSelectedPatientOrderItem(item); var viewModel = new UserOrderViewModel { OrderRowId = item.RowId, }; await NavFunc.NavigateToAsync(viewModel); }
public async Task Commit() { UIFunc.ShowLoading(U.StandartUpdatingText); var result = await WebServiceFunc.UpdatePassword(Model); UIFunc.HideLoading(); if (!result.Item1) { await UIFunc.AlertError(U.GetErrorUpdateText(result.Item2)); return; } await NavFunc.RestartApp(); }
public async Task Commit() { if (IsNewRow) { var order = new Order { IsNew = true, UserProfile = Model, Pois = new List <PatientOrderItem>(), }; UIFunc.ShowLoading(U.StandartUpdatingText); var result = await WebServiceFunc.SubmitRegister(order); UIFunc.HideLoading(); if (!result.Item1) { await UIFunc.AlertError(U.GetErrorUpdateText(result.Item2)); return; } var userProfileRowId = result.Item3.UserProfileRowId; UserOptions.SetUsernamePassword(Model.Email, Model.Password, userProfileRowId); //NavFunc.RemovePages<Views.ProfileView>(); //var viewmodel = new UserOrderListViewModel(); //await NavFunc.NavigateToAsync(viewmodel); await NavFunc.RestartApp(); } else { var userProfileRowId = await WebServiceFunc.CreateOrUpdateProfile(Model); UIFunc.HideLoading(); if (userProfileRowId == default(Guid)) { await UIFunc.AlertError(U.StandartErrorUpdateText); return; } await NavFunc.Pop(); } }
async Task Delete() { UIFunc.ShowLoading(U.StandartUpdatingText); var result = await WebServiceFunc.RemovePatientOrderItem(SelectedPatientOrderItem); UIFunc.HideLoading(); if (!result.Item1) { await UIFunc.AlertError(U.StandartErrorUpdateText); return; } IsCommit = true; await NavFunc.Pop(forceClose : true); }
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); }
public async Task Commit() { UIFunc.ShowLoading(U.StandartLoggingText); var result = await WebServiceFunc.SubmitLogin(Model); UIFunc.HideLoading(); if (!result.Item1) { var errtext = (string.IsNullOrEmpty(result.Item3) ? Globalization.T("(!)LoginError") : result.Item3); await UIFunc.AlertError(errtext); return; } var userProfileRowId = result.Item2.Value; var aspxauth = result.Item4; UserOptions.SetUsernamePassword(Model.email, Model.password, userProfileRowId); UserOptions.SetAspxauth(aspxauth); await NavFunc.RestartApp(); }
public async Task Commit() { var norder = JsonConvert.DeserializeObject <Order>(JsonConvert.SerializeObject(Order)); norder.Pois = PatientOrderItems.ToList(); UIFunc.ShowLoading(U.StandartUpdatingText); var result = await WebServiceFunc.SaveOrder(norder); UIFunc.HideLoading(); if (!result.Item1) { await UIFunc.AlertError(U.StandartErrorUpdateText); return; } var newOrder = result.Item2; IsCommit = true; await NavFunc.Pop(forceClose : true); }
public async static Task OpenPage() { var viewModel = new ChangePasswordViewModel(); await NavFunc.NavigateToAsync(viewModel); }
public async Task Register() { var viewModel = new ProfileViewModel(); await NavFunc.NavigateToAsync(viewModel); }
public async static Task OpenPage() { var viewModel = new LoginViewModel(); await NavFunc.NavigateToAsync(viewModel); }
public async Task Logout() { U.Logout(); await NavFunc.RestartApp(); }
public override async Task Init() { NavFunc.RemovePages <Views.LoginView>(); //await LoadLabours(); }