public ActionResult UserDashBoard()
        {
            ViewBag.login = false;

            var id = userData.UserId;

            var dashBoardModel = new Models.DashBoard();

            var newDashDAL = new DashBoardAccess();

            if (id > 0)
            {

                ///get level id by userid
                int userLevelId = newDashDAL.GetUserLevelByUserId(id);

                dashBoardModel.userId = id;
                dashBoardModel.userName = userData.UserName;
                dashBoardModel.roleName = (new UserManageAccess()).getUserRoleName(id);
                if (userLevelId == 1)
                {

                    dashBoardModel.levelId = 1;
                    return PartialView("~/Views/Shared/_UserDetail.cshtml", dashBoardModel);

                }
                else if (userLevelId == 2)
                {

                    dashBoardModel.levelId = 2;
                    return PartialView("~/Views/Shared/_UserDetail.cshtml", dashBoardModel);

                }
                else if (userLevelId == 3)
                {

                    dashBoardModel.levelId = 3;
                    return PartialView("~/Views/Shared/_UserDetail.cshtml", dashBoardModel);
                }
                else {
                    return RedirectToAction("UserLogin", "Login");
                }
            }
            else {
                return RedirectToAction("UserLogin", "Login");
            }
        }
        public ActionResult UserDashBoard()
        {
            ViewBag.login = false;

            var id = userData.UserId;

            var dashBoardModel = new Models.DashBoard();

            var newDashDAL = new DashBoardAccess();

            if (id > 0)
            {
                ///get level id by userid
                int userLevelId = newDashDAL.GetUserLevelByUserId(id);

                dashBoardModel.userId   = id;
                dashBoardModel.userName = userData.UserName;
                dashBoardModel.roleName = (new UserManageAccess()).getUserRoleName(id);
                if (userLevelId == 1)
                {
                    dashBoardModel.levelId = 1;
                    return(PartialView("~/Views/Shared/_UserDetail.cshtml", dashBoardModel));
                }
                else if (userLevelId == 2)
                {
                    dashBoardModel.levelId = 2;
                    return(PartialView("~/Views/Shared/_UserDetail.cshtml", dashBoardModel));
                }
                else if (userLevelId == 3)
                {
                    dashBoardModel.levelId = 3;
                    return(PartialView("~/Views/Shared/_UserDetail.cshtml", dashBoardModel));
                }
                else
                {
                    return(RedirectToAction("UserLogin", "Login"));
                }
            }
            else
            {
                return(RedirectToAction("UserLogin", "Login"));
            }
        }
        /// <summary>
        /// CreatedBy : Kasun Smarawickrama
        /// CreatedDate: 2016/01/14
        ///
        /// emplyee dashboard view
        /// </summary>
        /// <returns></returns>
        public ActionResult EmployeeDashBoard()
        {
            if (Session["employeeId"] == null)
            {
                return(RedirectToAction("EmployeeLogin", "Login"));
            }
            var id = (int)Session["employeeId"];

            var dashBoardModel = new Models.DashBoard();

            dashBoardModel.userName = (new UserAccess().getCompanyEmployeeName(id));
            if (id <= 0)
            {
                return(RedirectToAction("EmployeeLogin", "Login"));
            }
            else
            {
                dashBoardModel.userId = id;
                return(PartialView("~/Views/Shared/_EmployeeDetail.cshtml", dashBoardModel));
            }
        }
        /// <summary>
        /// CreatedBy : Kasun Smarawickrama
        /// CreatedDate: 2016/01/14
        /// 
        /// emplyee dashboard view
        /// </summary>
        /// <returns></returns>
        public ActionResult EmployeeDashBoard()
        {

            if (Session["employeeId"] == null)
            {
                return RedirectToAction("EmployeeLogin", "Login");
            }
            var id = (int)Session["employeeId"];

            var dashBoardModel = new Models.DashBoard();
            dashBoardModel.userName = (new UserAccess().getCompanyEmployeeName(id));
            if (id <= 0)
            {
                return RedirectToAction("EmployeeLogin", "Login");
            }
            else
            {
                dashBoardModel.userId = id;
                return PartialView("~/Views/Shared/_EmployeeDetail.cshtml", dashBoardModel);
            }


        }
        /// <summary>
        /// CreatedBy : Irfan MAM
        /// CreatedDate: 2016/02/02
        /// 
        /// Setup dashboard view
        /// </summary>
        /// <param name></param>
        /// <returns></returns>
        public ActionResult SetupDashBoard()
        {
            ViewBag.login = false;
            var dashBoardModel = new Models.DashBoard();

            //var newDashDAL = new DashBoardAccess();

            ///get level id by userid
            int userLevelId = userData.RoleId;

            dashBoardModel.userId = userData.UserId;
            dashBoardModel.userName = userData.UserName;
            dashBoardModel.roleName = (new UserManageAccess()).getUserRoleName(userData.UserId);
            dashBoardModel.levelId = userLevelId;
            dashBoardModel.step_status = userData.step_status;
            return PartialView(dashBoardModel);
        }