예제 #1
0
        public ActionResult AddAndUpdateUser(int userid)
        {
            //省份
            IEnumerable<SelectListItem> provinceList = null;
            List<t_Province> common = areaService.GetProvinceList();
            provinceList = common.Select(com => new SelectListItem { Value = com.provinceID.ToString(), Text = com.province });
            ViewBag.provinceList = provinceList;
            //工作年限
            List<WebLookup> workyearlist = commonService.GetLookupList("people_workyear");
            ViewBag.workyearslist = workyearlist;
            //工人职位
            List<WebLookup> commonworkPosition = commonService.GetLookupList("workers_position");       
            ViewBag.workPositionList = commonworkPosition;

            WebUser webuser = webuserservice.GetWebUserByID(userid);
            //List<WebLookup> weblooktypelist = webcommonser.GetLookupList("people_category");
            //IEnumerable<SelectListItem> typelist = weblooktypelist.Select(com => new SelectListItem { Value = com.Code.ToString(), Text = com.Description });
            //ViewBag.typelist = typelist;
            WebWorker work = new WebWorker();
            if (webuser != null)
            {
                if (webuser.PositionCode != "WebUser")
                {
                    work = workSer.GetWebWorkerByUserID(userid);
                }
            }else
            {
                webuser = new WebUser();
            }
            ViewBag.worker = work;
            return View(webuser);
        }
예제 #2
0
        public ActionResult DemandIndex(int id = 0)
        {
            DecDemand demand = demandSer.GetDecDemandByID(id);

            if (demand.PublishuserID != 0)
            {
                WebUser user = UserSer.GetWebUserByID(demand.PublishuserID);
                ViewBag.user = user;
            }
            return(View(demand));
        }
        // GET: MobileApp/MobileCenter
        public ActionResult mPCenter()
        {
            WebUser user = webUserservice.GetWebUserByID(Convert.ToInt32(SessionHelper.Get("UserID")));

            return(View(user));
        }