示例#1
0
        private async void OnEditInfo_Tapped(object sender, EventArgs e)
        {
            loadingPopup.IsVisible = true;
            if (ModalDangKyMoiGioi.Body == null)
            {
                dangKyMoiGioiView          = new DangKyMoiGioiContentView(LookUpModal, Guid.Parse(UserLogged.Id));
                dangKyMoiGioiView.OnSaved += async(s, e2) =>
                {
                    dangKyMoiGioiView.viewModel.MoiGioi.UserId       = viewModel.MoiGioi.UserId;
                    dangKyMoiGioiView.viewModel.MoiGioi.User         = viewModel.MoiGioi.User;
                    dangKyMoiGioiView.viewModel.MoiGioi.RegisterDate = viewModel.MoiGioi.RegisterDate;
                    viewModel.MoiGioi = dangKyMoiGioiView.viewModel.MoiGioi;
                    viewModel.GetTypeFormatString(viewModel.MoiGioi.Type);
                    await ModalDangKyMoiGioi.Hide();
                };
                dangKyMoiGioiView.OnCancel += async(object s, EventArgs e2) => await ModalDangKyMoiGioi.Hide();

                ModalDangKyMoiGioi.Body = dangKyMoiGioiView;
                ModalDangKyMoiGioi.CustomCloseButton(dangKyMoiGioiView.Cancel_Clicked);
            }
            dangKyMoiGioiView.InitUpdate(viewModel.MoiGioi);
            await ModalDangKyMoiGioi.Show();

            loadingPopup.IsVisible = false;
        }
示例#2
0
        public DangKyMoiGioiPage()
        {
            InitializeComponent();
            var dangKyMoiGioiContentView = new DangKyMoiGioiContentView(LookUpModal, Guid.Parse(UserLogged.Id));

            dangKyMoiGioiContentView.OnSaved += async(object s, EventArgs e2) =>
            {
                await Shell.Current.GoToAsync("//" + AppShell.QUANLYMOIGIOI);
            };
            dangKyMoiGioiContentView.OnCancel += async(object ssender, EventArgs e2) => await Navigation.PopAsync();

            MainContentView.Content = dangKyMoiGioiContentView;
        }