Ejemplo n.º 1
0
        public static CC InsertRec(string Email, string Pwd, string newToken, bool isConfirmed = false)
        {
            CC ccNew = null;

            Db.Transact(() =>
            {
                ccNew = new CC
                {
                    Email       = Email,
                    Pwd         = Pwd,
                    Token       = newToken,
                    InsTS       = DateTime.Now,
                    IsConfirmed = isConfirmed,
                };

                int i = Email.IndexOf('@');
                if (i >= 0)
                {
                    ccNew.Ad = Email.Remove(i);
                }
                else
                {
                    ccNew.Ad = Email;
                }
            });
            Db.Transact(() =>
            {
                HH hh = new HH
                {
                    Ad = ccNew.Ad,
                };
                ccNew.HHroot = hh;
            });

            PP ppNew = PP.InsertRec((long)ccNew.GetObjectNo(), "Örnek", null, null);

            Hlp.SablondanEkle(ppNew.GetObjectNo(), "HHSablon1");
            TT.InsertRec((long)ppNew.Id, "Aile", null, null, null);
            TT.InsertRec((long)ppNew.Id, "Baba", null, null, null);
            TT.InsertRec((long)ppNew.Id, "Anne", null, null, null);
            TT.InsertRec((long)ppNew.Id, "Çocuk1", null, null, null);
            TT.InsertRec((long)ppNew.Id, "Çocuk2", null, null, null);
            TT.InsertRec((long)ppNew.Id, "Araç1", null, null, null);
            TT.InsertRec((long)ppNew.Id, "Araç2", null, null, null);

            return(ccNew);
        }