Esempio n. 1
0
        public ActionResult Form(int id)
        {
            var model = this.bll.GetModel(id);

            if (model == null)
            {
                model = new TUserModel()
                {
                    ID = -1
                }
            }
            ;
            if (model.Photo != null)
            {
                this.ViewBag.avatar = "data:image/png;base64," + Convert.ToBase64String(model.Photo);
            }
            var unitModel = this.unitBll.GetModel(p => p.unitSeq == model.unitSeq);

            this.ViewBag.unitName = unitModel == null ? "" : unitModel.unitName;
            this.ViewBag.unitList = JsonConvert.SerializeObject(unitBll.GetModelList());
            this.ViewBag.Sex      = dicBll.GetModelList(DictionaryString.UserSex);
            this.ViewBag.State    = dicBll.GetModelList(DictionaryString.WorkState);
            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Form(int id)
        {
            var model = this.bll.GetModel(id);

            if (model == null)
            {
                model = new TWindowModel()
                {
                    ID = -1
                }
            }
            ;
            this.ViewBag.State    = dicBll.GetModelList(DictionaryString.WorkState);
            this.ViewBag.areaList = JsonConvert.SerializeObject(this.areaBll.GetModelList());
            var areaModel = this.areaBll.GetModel(p => p.id == model.AreaName);

            this.ViewBag.AreaText = areaModel == null ? "" : areaModel.areaName;
            return(View(model));
        }
        public ActionResult Form(int id)
        {
            var model = this.bll.GetModel(id);

            if (model == null)
            {
                model = new TBusinessModel()
                {
                    id = -1
                }
            }
            ;
            var unitModel = this.unitBll.GetModel(p => p.unitSeq == model.unitSeq);

            model.unitName        = unitModel == null ? "" : unitModel.unitName;
            this.ViewBag.busiType = dicBll.GetModelList(DictionaryString.AppointmentType);
            this.ViewBag.unitList = JsonConvert.SerializeObject(unitBll.GetModelList());
            return(View(model));
        }