Ejemplo n.º 1
0
        //public static string SMSTest()
        //{
        //    SMS sms = new SMS();
        //    return sms.TestSMS();
        //}

        public static List <RARTrans> PageTest(int pageIndex)
        {
            List <RARTrans> result = null;

            UserContent udb = new UserContent();
            var         ml  = udb.GetMemberInfoByOpenId("999");


            TransContent db = new TransContent();


            var list = db.ARTransDbSet.Where(t => t.openId == "999").Join(db.MemberInfo, a => a.FromOpenId, b => b.openId,
                                                                          (a, b) => new RARTrans
            {
                ChildNickName = b.nickname,
                openId        = a.openId,
                Amount        = a.Amount,
                TransDateTime = a.TransDateTime,
                TransId       = a.TransId,
                TransRemark   = a.TransRemark
            });

            int count = list.Count();

            list   = list.OrderBy(t => t.TransDateTime);
            result = list.Skip(pageIndex * 10).Take(10).ToList();



            return(result);
        }
Ejemplo n.º 2
0
 public static void DBinit()
 {
     using (UserContent db = new UserContent())
     {
         db.Get("111");
         db.GetMemberInfoByOpenId("111");
     }
 }
Ejemplo n.º 3
0
        public static void test()
        {
            EOrderLine  order = null;
            EMemberInfo mi    = null;

            using (TransactionScope sc = new TransactionScope())
            {
                using (UserContent db = new UserContent())
                {
                    string openId = "orKUAw16WK0BmflDLiBYsR-Kh5bE";

                    db.UpdateToMemberLevel2(openId);
                    mi = db.GetMemberInfoByOpenId(openId);
                    db.SaveChanges();
                }
                using (OrderContent odb = new OrderContent())
                {
                    order = odb.UpdateToPaidOrder(mi);
                }
            }
        }