public ActionResult ViewDepartment(string page, string success, string error, string delete_success, string delete_error)
        {
            var departments = new List <NodeModel>();

            try
            {
                if (SessionIsNull())
                {
                    return(Redirect("/Home/Login?mustLogin=true&next=/Department/ViewDepartment"));
                }
                PlanService ser      = new PlanService();
                int         _page    = 1;
                bool        isParsed = int.TryParse(page, out _page);
                if (!isParsed || _page <= 0)
                {
                    _page = 1;
                }
                departments = ser.ViewNodeByNodeType("25da3697-59f4-11e9-8ceb-fb681531b90a", 10, _page);
                int nombre = ser.CountLevel("25da3697-59f4-11e9-8ceb-fb681531b90a");
                ViewBag.pagination = new PageUtility().MakePagination(10, nombre, _page, "/Department/ViewDepartment?page=");
                if (!string.IsNullOrEmpty(success) && success.Equals("true"))
                {
                    ViewBag.success = "Saving with success!";
                }
                if (!string.IsNullOrEmpty(error) && error.Equals("true"))
                {
                    ViewBag.error = "An error has occured!";
                }
                if (!string.IsNullOrEmpty(delete_success) && delete_success.Equals("true"))
                {
                    ViewBag.success = "Deleting with success!";
                }
                if (!string.IsNullOrEmpty(delete_error) && delete_error.Equals("true"))
                {
                    ViewBag.error = "An error has occured while deleting!";
                }
                SetViewBag();
                ViewData["Department"] = departments;
            }
            catch (Exception)
            {
                ViewBag.error = "An error has occured!";
            }
            return(View(departments));
        }