コード例 #1
0
        public ActionResult DenyPagePermission(GrantDenyStudyModel model)
        {
            try
            {
                int UserID = (int)Session["AccessUserId"];
                foreach (StudyModel ds in model.studymodelGranted)
                {
                    if (ds.Selected == true)
                    {
                        if (!(studymanager.DenyStudyPermission(ds.StudyID, UserID, ds.SponsorName)))
                        {
                            return(View("Error"));
                        }
                    }
                }

                return(View("Sponsor_StudyManagement"));
            }
            catch (NullReferenceException ex)
            {
                return(Redirect(FormsAuthentication.LoginUrl));
            }
            catch (Exception e)
            {
                ViewBag.message = e.Message;
                return(View("Error"));
            }
        }
コード例 #2
0
 public ActionResult Allow_DenyStudy(GrantDenyStudyModel model, string btn)
 {
     if (model != null)
     {
         if (btn == "Grant")
         {
             return(AllowPermission(model));
         }
         else if (btn == "Deny")
         {
             return(DenyPagePermission(model));
         }
     }
     return(View("Error"));
 }