// goto company page private async void OnCompanyClicked(object sender, EventArgs e) { await UserLogged.ReloadProfile(); var appShell = (AppShell)Shell.Current; appShell.AddMenu_QuanLyCongTy(); if (string.IsNullOrEmpty(UserLogged.CompanyId)) { string action = await DisplayActionSheet(Language.cong_ty, Language.huy, null, Language.dang_ky_cong_ty, Language.dang_ky_nhan_vien); if (action == Language.dang_ky_cong_ty) { await Navigation.PushAsync(new AddCompanyPage()); } else if (action == Language.dang_ky_nhan_vien) { enNumPhone.Text = ""; await ModalRegisterEmployee.Show(); } } else { await Shell.Current.GoToAsync("//" + AppShell.QUANLYCONGTY); } }
public async void Init() { if (UserLogged.IsLogged) { await UserLogged.ReloadProfile(); AccountShellContent.Content = new AccountPage(); SetLogoutMenuItem(); } else { AccountShellContent.Content = new LoginPage(); } AddMenu_QuanLyCongTy(); AddMenu_QuanLyMoiGioi(); }
// moi gioi private async void OpenModalDangKyMoiGioi_Tapped(object sender, EventArgs e) { await UserLogged.ReloadProfile(); var appShell = (AppShell)Shell.Current; appShell.AddMenu_QuanLyMoiGioi(); if (UserLogged.Type == 1) { await Shell.Current.GoToAsync("//" + AppShell.QUANLYMOIGIOI); } else { await DangKyMoiGioi(); } }