示例#1
0
        public static Dojo GetDojoDachi(HttpContext context)
        {
            string dojodachi = context.Session.GetString("dojo");

            if (dojodachi == null)
            {
                Dojo dachi = new Dojo();
                context.Session.SetString("dojo", JsonConvert.SerializeObject(dachi));
                return(dachi);
            }
            else
            {
                Dojo dachi = JsonConvert.DeserializeObject <Dojo>(dojodachi);
                return(dachi);
            }
        }
示例#2
0
 public static void SetDojoDachi(HttpContext context, Dojo dachi)
 {
     context.Session.SetString("dojo", JsonConvert.SerializeObject(dachi));
 }