public AuthorArticleViewModel()
 {
     cpFeed   = DependencyService.Get <ICPFeeds>();
     Title    = "CodeProject";
     Icon     = "icon.png";
     Articles = new ObservableCollection <Item>();
 }
Esempio n. 2
0
        public vwHomePage(MainPage pmainPage, Intent screenshareIntent)
        {
            ScreenshareIntent = screenshareIntent;
#endif

            oMainPage = pmainPage;
            InitializeComponent();
            NavigationPage.SetBackButtonTitle(this, "");
            NavigationPage.SetHasNavigationBar(this, false);
            BindingContext = _HomeViewModel = new HomeViewModel(this);

            InitFormulario();
            this.cpFeeds = DependencyService.Get <ICPFeeds>();
            //this.oCometChatService = new CometChatService(this);
            this.oInternetService = new InternetService(this);
            Settings.bClicButton  = false;
            _loginPopup           = new PopupLoad();

            var tapGestureRecognizer = new TapGestureRecognizer();
            tapGestureRecognizer.Tapped += async(s, e) =>
            {
                // handle the tap

                oMainPage.IsPresented = true;
                //Settings.COVIDFolio = "";
                await Navigation.PopAsync();
            };
            tabMenu.GestureRecognizers.Add(tapGestureRecognizer);

#if __ANDROID__
            statusBarHeigth = new Thickness(0, 40, 0, 0);
            mainMarginTop   = 168;
            Console.WriteLine("__ANDROID__ is defined");
#endif
        }
Esempio n. 3
0
 public ProfileViewModel()
 {
     cpFeed  = DependencyService.Get <ICPFeeds>();
     Title   = "FindMe";
     Icon    = "icon.png";
     Profile = new ObservableCollection <MyProfile>();
 }
Esempio n. 4
0
 public ProfileViewModel ()
 {
     cpFeed = DependencyService.Get<ICPFeeds>();
     Title = "CodeProject";
     Icon = "icon.png";
     Profile = new ObservableCollection<MyProfile>();
 }
Esempio n. 5
0
 public ArticleViewModel()
 {
     cpFeed = DependencyService.Get<ICPFeeds>();
     Title = "CodeProject";
     Icon = "icon.png";
     Articles = new ObservableCollection<Item>();
 }
Esempio n. 6
0
 public GacetaPdfViewModel()
 {
     cpFeed    = DependencyService.Get <ICPFeeds>();
     Title     = "CodeProject";
     Icon      = "icon.png";
     GacetaPdf = new ObservableCollection <GacetaPdf>();
 }
        public async Task ReloadData()
        {
            source.Clear();
            HideAll();
            ICPFeeds Service  = DependencyService.Get <ICPFeeds>();
            var      response = await Service.GetMembership();

            if (response.Status)
            {
                foreach (var e in response.Items)
                {
                    var icon = e.Icon.Replace(@"\u", @"");
                    source.Add(item: new ContractMembershipDTO
                    {
                        Id          = e.Id,
                        Icon        = icon.ToUnicode(FontAwesomeIcons.IdCard),
                        Title       = e.Name.ToUpper(),
                        Description = e.Abstract,
                        Cost        = e.Cost.ToString("$0.00"),
                        RealCost    = e.Cost
                    });
                }
                ShowDataButton();
            }
            else
            {
                ShowDataError();
            }
        }
 /**
  * constructor
  */
 public vwPopupFolio()
 {
     InitializeComponent();
     BindingContext = this;
     cpFeedService  = DependencyService.Get <ICPFeeds>();
     Loading(false);
 }
Esempio n. 9
0
        public LoginViewModel(Page page, Intent screenshareIntent) : base(page)
        {
            ScreenshareIntent = screenshareIntent;
            ovwPopupTerminos  = new vwPopupTerminos(ScreenshareIntent);
#endif

            if (Device.RuntimePlatform == Device.iOS)
            {
                ShowLogo = true;
            }

            this.cpFeeds = DependencyService.Get <ICPFeeds>();
            Settings.bChatInicializado = false;
            oInternetService           = new InternetService(page);

            // ejecutamos la verificacion de la tienda.
            // cuando se crea el modelo.
            //Task.Run(async () => {
            //    IsBusy = true;
            //    if(await oInternetService.VerificaInternet())
            //    {
            //        await VerifyStoreVersion();
            //    }
            //    IsBusy = false;
            //});
        }
        public async Task <bool> SubmitData()
        {
            ICPFeeds Service  = DependencyService.Get <ICPFeeds>();
            var      Items    = _DataSource.ToList();
            var      response = await Service.m_GetCOVIDType(
                asks : Items,          // respuestas del formulario
                latitude : latitude,   //latitud
                longitude : longitude, //longitud
                error : errorLocation  // error al no obtener la ubicacion.
                );

            if (response.Status)
            {
                await vwPopupCOVIDSurvey
                .Show(PopupNavigation.Instance,
                      response.Items,
                      response.Folio);

                // hay folio hay que llevarlo a la vista de llamada.
                return(true);
            }
            await viewContext.DisplayAlert("Información", response.Msg, "Aceptar");

            return(false);
        }
Esempio n. 11
0
        public MeditocDirectoryView()
        {
            oModel = new MedicDirectoryModel(this);
#endif
            InitializeComponent();
            BindingContext = oModel;
            ((NavigationPage)Application.Current.MainPage).BarTextColor = Color.FromHex("#12B6CB");
            NavigationPage.SetBackButtonTitle(this, "");


            this.cpFeeds = DependencyService.Get <ICPFeeds>();

            relativePrincipal.Children.Add(
                txtEspecialidad,
                Constraint.RelativeToParent((parent) =>
            {
                return(parent.Width / 3.3);
            }));

            lstEspecialidades = new List <specialtyDTO>();

            lstEspecialidades = Task.Run(() => oModel.CargarDatos()).Result;

            iconSearch.Text = FontAwesomeIcons.Search;

            txtBuscarEspecialidad.Completed += txtEspecialidad_Enter;

            BindingContext = this;
        }
Esempio n. 12
0
        private async void OnClickSiguiente(object sender, EventArgs args)
        {
            try
            {
                ovwPopupLoad = new PopupLoad();
                await PopupNavigation.Instance.PushAsync(ovwPopupLoad);

                if (this.bInicio)
                {
                    if (this.iVista == 1)
                    {
                        this.iVista = 0;
                    }
                    else
                    {
                        this.iVista = 1;
                    }

                    this.sTextBoton = "Aceptar";
                    this.bInicio    = false;
                    InitForm();
                }
                else
                {
                    if (this.sTextBoton == "Aceptar")
                    {
                        oLoginModel                         = new LoginModel();
                        oLoginModel.sUIDCliente             = Settings.sUsuarioUID;
                        oLoginModel.bAceptoTerminoCondicion = true;
                        this.cpFeeds                        = DependencyService.Get <ICPFeeds>();
                        if (await this.cpFeeds.m_Acepta_Temino_y_condiciones(Settings.sUserNameLogin))
                        {
                            Settings.bSession = true;

#if __IOS__
                            Application.Current.MainPage = new MainPage();
#else
                            Application.Current.MainPage = new MainPage(ScreenshareIntent);
#endif
                            //if (Device.RuntimePlatform == Device.iOS)
                            //    Application.Current.MainPage = new MainPage();
                            //else
                            //    Application.Current.MainPage = new MainPage();// { ToolbarItems = { new ToolbarItem { Icon = "meditoc_white.png", Priority = 3, Order = ToolbarItemOrder.Primary } } };
                        }
                        else
                        {
                            await DisplayAlert("Términos y condiciones.", "Hubo un error al aceptar los términos y condiciones, reintente por favor.", "Aceptar");
                        }
                    }
                    else
                    {
                        InitForm();
                    }
                }

                await PopupNavigation.Instance.PopAsync();
            }
            catch { }
        }
Esempio n. 13
0
 public ArticleViewModel(int cveCategoria)
 {
     cpFeed   = DependencyService.Get <ICPFeeds>();
     Title    = "CodeProject";
     Icon     = "icon.png";
     cveCateg = cveCategoria;
     Articles = new ObservableCollection <Item>();
 }
Esempio n. 14
0
        public vwFolio(MainPage page)
        {
#endif
            InitializeComponent();
            mainPage   = page;
            webService = DependencyService.Get <ICPFeeds>();

            Configure();
        }
        public medicSpecialityModel(MedicSpecialityView page) : base(page)
        {
#endif
            ViewContext      = page;
            oInternetService = new InternetService(page);

            this.cpFeeds     = DependencyService.Get <ICPFeeds>();
            oInternetService = new InternetService(page);
        }
        public MedicDirectoryModel(MeditocDirectoryView page) : base(page)
        {
#endif
            ViewContext      = page;
            oInternetService = new InternetService(page);

            this.cpFeeds     = DependencyService.Get <ICPFeeds>();
            oInternetService = new InternetService(page);
        }
Esempio n. 17
0
        public vwLoginPage(Intent screenshareIntent)
        {
            ScreenshareIntent = screenshareIntent;
            InitializeComponent();
            BindingContext = loginViewModel = new LoginViewModel(this, ScreenshareIntent);
#endif

            InitFormulario();
            this.cpFeeds = DependencyService.Get <ICPFeeds>();
        }
        public vwPopupTerminos(Intent screenshareIntent)
        {
            ScreenshareIntent = screenshareIntent;
#endif


            InitializeComponent();
            Initialize();
            this.cpFeeds = DependencyService.Get <ICPFeeds>();
        }
Esempio n. 19
0
        public HomeViewModel(Page page)
            : base(page)
        {
            this.cpFeeds = DependencyService.Get <ICPFeeds>();
            //this._CometChatService = new CometChatService(page);
            Settings.bChatInicializado = false;
            Settings.bClosePopPup      = true;
            // _loginPopup = new PopupLoad();

            _PopupInstructions = new PopupInstructions();
        }
        public async Task ReloadData()
        {
            _DataSource.Clear();
            HideAll();
            ICPFeeds Service  = DependencyService.Get <ICPFeeds>();
            var      response = await Service.m_GetCOVIDSurvey();

            if (response.Count() > 0)
            {
                foreach (SurveyAsk item in response)
                {
                    item.TypeField = TYPE_FIELD.CHECKBOX;
                    _DataSource.Add(item: item);
                }

                String phoneValue = "";
                if (!string.IsNullOrEmpty(Settings.sUserNameLogin))
                {
                    List <string> split_login = Settings.sUserNameLogin
                                                .Split("_")
                                                .ToList();

                    if (split_login.Count() > 1)
                    {
                        phoneValue = split_login[1];
                    }
                }

                _DataSource.Add(SurveyAsk.BuildTextField("telefono", phoneValue, "Teléfono", true));
                _DataSource.Add(SurveyAsk.BuildTextField("cp", "", "Código postal", true));

                ShowDataButton();
                return;
            }
            ShowDataError();
        }
Esempio n. 21
0
 public RecuperarContrasenaViewModel(Page page)
     : base(page)
 {
     this.cpFeeds = DependencyService.Get <ICPFeeds>();
 }
Esempio n. 22
0
 public LoginViewModel(Page page)
     : base(page)
 {
     this.cpFeeds = DependencyService.Get<ICPFeeds>();
 }
 public AuthorDataViewModel(AuthorDataType dataType)
 {
     this.authorDataType = dataType;
     cpFeed     = DependencyService.Get <ICPFeeds>();
     AutorItems = new ObservableCollection <Item>();
 }
Esempio n. 24
0
 public LoginViewModel(Page page)
     : base(page)
 {
     this.cpFeeds = DependencyService.Get <ICPFeeds>();
 }
 public CategoryViewModel()
 {
     cpFeed     = DependencyService.Get <ICPFeeds>();
     Categorias = new List <Categoria>();
     jsonResp   = "";
 }
 public CambioContrasenaViewModel(Page page)
     : base(page)
 {
     this.cpFeeds     = DependencyService.Get <ICPFeeds>();
     this._loginPopup = new PopupLoad();
 }
 public AuthorDataViewModel(AuthorDataType dataType)
 {
     this.authorDataType = dataType;
      cpFeed = DependencyService.Get<ICPFeeds>();
      AutorItems = new ObservableCollection<Item>();
 }
 public ForumDetailsViewModel(int id)
 {
     cpFeed = DependencyService.Get<ICPFeeds>();
     ForumList = new ObservableCollection<Item>();
     this.forumId = id;
 }
Esempio n. 29
0
 public HomeViewModel()
 {
     this.cpFeeds = DependencyService.Get <ICPFeeds>();
     CreatellectionAsync();
 }
Esempio n. 30
0
 public ForumDetailsViewModel(int id)
 {
     cpFeed       = DependencyService.Get <ICPFeeds>();
     ForumList    = new ObservableCollection <Item>();
     this.forumId = id;
 }
Esempio n. 31
0
        public async void Submit_Tapped(System.Object sender, System.EventArgs e)
        {
            errors.IsVisible           = false;
            errors.Text                = "";
            buttonsLayout.IsVisible    = false;
            loadingIndicator.IsVisible = true;
            loadingIndicator.IsRunning = true;

            if (string.IsNullOrEmpty(Coupon) && string.IsNullOrWhiteSpace(Coupon))
            {
                errors.IsVisible           = true;
                buttonsLayout.IsVisible    = true;
                errors.Text                = "Es necesario que ingrese un código de descuento";
                loadingIndicator.IsVisible = false;
                loadingIndicator.IsRunning = false;
                return;
            }

            if (!await internetService.VerificaInternet())
            {
                errors.IsVisible           = true;
                errors.Text                = "Sin conexión a internet";
                buttonsLayout.IsVisible    = true;
                loadingIndicator.IsVisible = false;
                loadingIndicator.IsRunning = false;
                return;
            }

            ICPFeeds Service = DependencyService.Get <ICPFeeds>();
            var      model   = await Service.VerifyCoupon(Coupon);

            if (model is null)
            {
                errors.IsVisible           = true;
                buttonsLayout.IsVisible    = true;
                loadingIndicator.IsVisible = false;
                loadingIndicator.IsRunning = false;
                errors.Text = "Ocurrio un error al obtener la respuesta del servidor, intente de nuevo.";
                return;
            }

            if (model.Code != "0")
            {
                errors.IsVisible           = true;
                buttonsLayout.IsVisible    = true;
                loadingIndicator.IsVisible = false;
                loadingIndicator.IsRunning = false;
                errors.Text = model.Message;
                return;
            }

            // verificamos descuento de monto.
            //if(model.Result.CategoryId == 1 && model.Result.QuantityDiscount > Total)
            //{
            //    errors.IsVisible = true;
            //    buttonsLayout.IsVisible = true;
            //    loadingIndicator.IsVisible = false;
            //    loadingIndicator.IsRunning = false;
            //    errors.Text = $"Este cupón no se puede utilizar tiene un descuento de ${model.Result.QuantityDiscount} que es mayor a ${Total}";
            //    return;
            //}

            if (_resultCompletion != null)
            {
                _resultCompletion.SetResult(
                    PromotionalCodeResult.Success(
                        model.Result.Id,
                        model.Result.Code,
                        model.Result.QuantityDiscount ?? 0,
                        model.Result.Remarks,
                        model.Result.DueDate,
                        model.Result.CategoryId,
                        model.Result.PercentageDiscount ?? 0
                        ));
                _resultCompletion = null;
            }
        }
Esempio n. 32
0
 public DetailViewModel(int iMovie)
 {
     this.cpFeeds = DependencyService.Get <ICPFeeds>();
     GetData(iMovie);
 }