Example #1
0
 public override void UpdateUi(ScreenActivationContext sac)
 {
     Items.Clear();
        Items.AddRange(sac.Jq.All("suggestions",
        cqq => new SuggestionViewModel()
        {
            Name = cqq.GetText("suggest"),
            Link = cqq.GetLink("suggest")
        }));
 }
Example #2
0
 public override void UpdateUi(ScreenActivationContext sac)
 {
     Search = sac.Jq.GetForm("dzebna");
     Items.Clear();
     Items.AddRange(sac.Jq.All("produktebi",
         cqq => new ProductItemViewModel()
             {
                 Name = cqq.GetText("dasakheleba"),
                 Eans = cqq.GetText("eans"),
                 Photo = cqq.GetText("img"),
                 Open = cqq.GetLink("self")
             }));
 }
Example #3
0
        protected override bool DoCanHandle(ScreenActivationContext sac)
        {
            return sac.Jq.IsTitle("gadakhdisForma") || sac.Jq.IsTitle("cheki");

        }
Example #4
0
 public override void UpdateUi(ScreenActivationContext sac)
 {
     var jq = sac.Jq;
     jq.IsTitle("cheki", Print);
     jq.IsTitle("gakidva", UpdateSaleViewModel);
     jq.IsTitle("gadakhdisForma", ShowPaymentForm);
 }
Example #5
0
 protected virtual bool DoCanHandle(ScreenActivationContext sac)
 {
     return false;
 }
Example #6
0
 public virtual void UpdateUi(ScreenActivationContext sac)
 {
 }
Example #7
0
 public bool CanHandle(ScreenActivationContext sac)
 {
     var attribute = this.GetType().GetAttributes<TitleAttribute>(false).First();
     var result = sac.Jq.IsTitle(attribute.Name);
     return result || DoCanHandle(sac);
 }
Example #8
0
        public override void UpdateUi(ScreenActivationContext sac)
        {
            var cqq = sac.Jq;
            Id = cqq.GetText("ref");
            Barcode = cqq.GetText("ref");
            Name = cqq.GetText("dasakheleba");
            ExcelFileName = "";
            Price = cqq.GetForm("fasisShecvla");
            Eans = "";
            Photos.Clear();
            Photos.Add(cqq.GetText("img"));

            NotifyOfPropertyChange(() => ActivePhoto);
            References.Clear();
            References.AddRange(cqq.All("eans",
                cqq1 => cqq1.All("refs", q => new ReferenceViewModel()
                {
                    Barcode = q.GetText("ref"),
                    Open = q.GetLink("self"),
                })).SelectMany(x => x));
        }