예제 #1
0
        public ActionResult OrgList()
        {
            string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

            ViewBag.Version = version;
            int UserId                  = SurveyHelper.GetDecryptUserId(Session["UserId"].ToString());
            int UserHighestRole         = int.Parse(Session["UserHighestRole"].ToString());
            OrganizationRequest Request = new OrganizationRequest();

            Request.UserId   = UserId;
            Request.UserRole = UserHighestRole;
            OrganizationResponse Organizations = _isurveyFacade.GetUserOrganizations(Request);

            List <OrganizationModel> Model        = Mapper.ToOrganizationModelList(Organizations.OrganizationList);
            OrgListModel             OrgListModel = new OrgListModel();

            OrgListModel.OrganizationList = Model;

            if (UserHighestRole == 3)
            {
                return(View("OrgList", OrgListModel));
            }
            else
            {
                return(RedirectToAction("UserList", "AdminUser"));
            }
        }