コード例 #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 DownloadList()
        {
            List <WebLookup> looklist = webCommSer.GetLookupList("DownLoad_type");

            ViewBag.looklist = looklist;

            return(View());
        }
コード例 #3
0
        public ActionResult DownLoadList(int LookupID = 1)
        {
            List <WebLookup> list = commSer.GetLookupList("DownLoad_type");

            ViewBag.list = list;
            return(View());
        }
コード例 #4
0
        // GET: Demand
        public ActionResult DemandList()
        {
            List <WebLookup> list = comser.GetLookupList("Demand_type");

            ViewBag.Typelist = list;
            return(View());
        }
コード例 #5
0
        public ActionResult buidingStageByWorker(int DemandID = 0, int BuidingID = 0)
        {
            IWebCommon                   commonService      = new WebCommonService();
            List <WebLookup>             commonworkPosition = commonService.GetLookupList("Buiding_process");
            IEnumerable <SelectListItem> workPositionList   = commonworkPosition.Select(com => new SelectListItem {
                Value = com.Code.ToString(), Text = com.Description
            });

            ViewBag.workPositionList = workPositionList;

            WebBuiding buidling = buidSer.GetWebBuidingByDemandID(DemandID);

            if (BuidingID != 0 && DemandID == 0)
            {
                buidling = buidSer.GetWebuidingByID(BuidingID);
            }
            if (BuidingID == 0 && DemandID == 0)
            {
                buidling = new WebBuiding();
            }

            if (buidling == null)
            {
                buidling = new WebBuiding();
            }
            return(View(buidling));
        }
コード例 #6
0
        // GET: MobileApp/MobileWorker
        public ActionResult mWorkerList()
        {
            string mkjcitycode = SessionHelper.GetSession("mkjcitycode").ToString();

            List <t_Area>    t_Arealist = t_AreaService.GetAreaListByfather(mkjcitycode);
            List <WebLookup> workerlist = wCSer.GetLookupList("workers_position");

            ViewBag.workerlist = workerlist;
            ViewBag.t_Arealist = t_Arealist;
            return(View());
        }
コード例 #7
0
        public ActionResult AddOrEditGoods(int Goodid)
        {
            WebGoods webgood = webGoodsService.GetWebGoodsByID(Goodid);

            if (webgood == null)
            {
                webgood = new WebGoods();
            }
            List <WebLookup> goodtypelist = webCommonService.GetLookupList("Goods_type");

            IEnumerable <SelectListItem> goodtype = goodtypelist.Select(com => new SelectListItem {
                Value = com.Code.ToString(), Text = com.Description
            });

            ViewBag.goodtypelist = goodtype;
            return(View(webgood));
        }