Esempio n. 1
0
        public ActionResult EditOtherProject(OtherProjects other)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(View());
                }
                var updateOtherProject = Mapper.Map <DATA.OtherProjects>(other);
                oProjec.UpdateOtherProject(updateOtherProject);
                int x = (Int32)Session["UserType"];
                switch (x)
                {
                case 1:
                    return(RedirectToAction("PmProjects", "User"));

                case 2:
                    return(RedirectToAction("UserMyProjects", "User"));

                case 3:
                    return(RedirectToAction("Index", "OtherProjects"));

                case 4:
                    return(RedirectToAction("Index", "OtherProjects"));

                default:
                    return(RedirectToAction("Index", "Home"));
                }
            }
            catch
            {
                return(View());
            }
        }
Esempio n. 2
0
 public ActionResult EditOtherProject(OtherProjects other)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(View());
         }
         var updateOtherProject = Mapper.Map <DATA.OtherProjects>(other);
         oProjec.UpdateOtherProject(updateOtherProject);
         return(RedirectToAction("Index", "Home"));
     }
     catch
     {
         return(View());
     }
 }