Example #1
0
        // GET: Employee
        public ActionResult Index()
        {
            //was added to pass the data direct
            ViewBag.Profile = context.Cybers.ToList();

            if (TempData["message"] != null)
            {
                ViewBag.Sucess = (string)TempData["message"];
            }
            var models = _cybMgr.GetCybers();

            if (models.Succeeded == true)
            {
                return(View(models.Unwrap().ToList()));
            }
            else
            {
                ModelState.AddModelError(string.Empty, "an error occure");
                return(View());
            }
        }