using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace SmartCDC.Controllers
{
    public class LayoutController : Controller
    {
        // GET: Layout
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult LayoutDetails()
        {
            LayoutModel model = new LayoutModel();
            model.LastUpdatedOn = DateTime.Now.ToString();
            if (Session["Authentications"] != null)
            {
                model.Name = ((AuthenticationModel)Session["Authentications"]).name;
            }
            else
                model.Name = "Smart";
            return Json(model, JsonRequestBehavior.AllowGet);
        }
    }
    public class LayoutModel
    {
        public string LastUpdatedOn { get; set; }
        public string UserEmail { get; set; }
        public string UserId { get; set; }
        public string Name { get; set; }
        public string LastLoginDate { get; set; }
    }
    public class AuthenticationModel
    {
        public bool isSuccess { get; set; }
        public string Message { get; set; }
        public string userEmail { get; set; }
        public string name { get; set; }
        public string lastlogin { get; set; }
        public string token { get; set; }
        public string role { get; set; }
        public List<string> permissions { get; set; }
        //public List<int> lineids { get; set; }
        //public List<view_UserPermissionModules> PermissionModules { get; set; }
        public string MenuGroup { get; set; }
        public string MenuName { get; set; }
    }
}