Ejemplo n.º 1
0
        static void Main()
        {
            Hlp.Indexes();

            IHandler[] handlers = new IHandler[]
            {
                new MainHandlers(),
                new PartialHandlers()
                //new HookHandlers()
            };

            foreach (IHandler handler in handlers)
            {
                handler.Register();
            }

            if (Db.SQL <CC>("select r from CC r where r.Email = ?", "test").FirstOrDefault() == null)
            {
                var ccNew = CC.InsertRec("test", "test", "test", true);

                Db.Transact(() =>
                {
                    new CU
                    {
                        CC    = ccNew,
                        Email = $"{ccNew.Email}/1",
                        Token = $"{ccNew.Email}/1",
                        Ad    = "Test1",
                        Pwd   = "test/1"
                    };
                });
            }

            string email = "*****@*****.**";

            if (Db.SQL <CC>("select r from CC r where r.Email = ?", email).FirstOrDefault() == null)
            {
                string pwd   = "adlc";
                string token = Hlp.EncodeQueryString($"{email}/{pwd}");
                CC     ccNew = CC.InsertRec(email, pwd, token, true);
                PP     ppNew = PP.InsertRec((long)ccNew.GetObjectNo(), "TurgutreisMarina", null, null);
                Hlp.SablondanEkle(ppNew.GetObjectNo(), "HHSablonTenis");
            }

            email = "*****@*****.**";
            if (Db.SQL <CC>("select r from CC r where r.Email = ?", email).FirstOrDefault() == null)
            {
                string pwd   = "sdgm";
                string token = Hlp.EncodeQueryString($"{email}/{pwd}");
                CC     ccNew = CC.InsertRec(email, pwd, token, true);
            }
        }
Ejemplo n.º 2
0
        void Handle(Input.InsTrgr Action)
        {
            var p = this.Parent as PPsPage;

            if (!string.IsNullOrWhiteSpace(Ad))
            {
                PP.InsertRec(p.CCId, Ad, BasTrhX, BitTrhX);

                Id = 0;
            }
            Opened = false;

            p.Data = null;

            Session.RunTaskForAll((s, sId) => {
                var cp = (s.Store[nameof(MasterPage)] as MasterPage).CurrentPage;
                if (cp is PPsPage)
                {
                    (s.Store[nameof(MasterPage)] as MasterPage).CurrentPage.Data = null;
                    s.CalculatePatchAndPushOnWebSocket();
                }
            });
        }