Exemple #1
0
        public IActionResult Index()
        {
            ConvertArrayToObj <User> cvtOjtToArr = new ConvertArrayToObj <User>();

            byte[] array = HttpContext.Session.Get("user");
            if (array == null)
            {
                return(RedirectToAction("Login", "Login"));
            }

            return(View());
        }
Exemple #2
0
        public IActionResult Index(int id)
        {
            ConvertArrayToObj <Regist> cato = new ConvertArrayToObj <Regist>();

            byte[]   array = HttpContext.Session.Get("regist");
            Regist   rg    = cato.DoConvert(array);
            MsgClass mc    = new MsgClass();

            if (id == 1)
            {
                InsDao idao = new InsDao();
                if (idao.DoInsert(rg) == 0)
                {
                    mc.Msg = "new registration is done";
                }
            }

            ViewData["msg"] = mc;

            return(View());
        }