Exemplo n.º 1
0
        public ActionResult RealestateEdit(Guid id)
        {
            var model = new ProfileComplexModel();

            model.Realestate = this._IBase_RealestateService.GetByKey(id);
            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult AccountEdit(Guid id)
        {
            var model = new ProfileComplexModel();

            model.Account = this._IBase_AccountService.GetByKey(id);
            return(View(model));
        }
Exemplo n.º 3
0
        public ActionResult StoreEdit(Guid id)
        {
            var model = new ProfileComplexModel();

            model.Store = this._IBase_StoreService.GetByKey(id);
            return(View(model));
        }
Exemplo n.º 4
0
        public ActionResult CarEdit(Guid id)
        {
            var model = new ProfileComplexModel();

            model.Car = this._IBase_CarService.GetByKey(id);
            return(View(model));
        }
Exemplo n.º 5
0
        public JsonResult Edit(ProfileComplexModel model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    this._IBase_ProfileServicel.Update(new List <Ingenious.DTO.Base_ProfileDTO> {
                        model.Profile
                    });
                }
                catch (Exception e)
                {
                    return(Json(new MessageResult {
                        Status = false, Message = e.InnerException.InnerException.Message
                    }));
                }
                return(Json(new MessageResult {
                    Status = true, Message = "编辑成功"
                }));
            }

            return(Json(new MessageResult {
                Status = false, Message = ModelState.GetErrorMsg()
            }));
        }
Exemplo n.º 6
0
        public ActionResult FactoryEdit(Guid id)
        {
            var model = new ProfileComplexModel();

            model.Factory = this._IBase_FactoryService.GetByKey(id);

            return(View(model));
        }
Exemplo n.º 7
0
        public ActionResult Realestate(string id)
        {
            ViewBag.idno = id;
            var model = new ProfileComplexModel()
            {
                Realestate = new Ingenious.DTO.Base_RealestateDTO()
            };

            return(View(model));
        }
Exemplo n.º 8
0
        public ActionResult Details(string id)
        {
            var model = new ProfileComplexModel();

            model.Profile        = this._IBase_ProfileServicel.GetProfileByIDNo(id);
            model.CarList        = this._IBase_CarService.GetCarByIDNo(id);
            model.FactoryList    = this._IBase_FactoryService.GetFactoryByIDNo(id);
            model.StoreList      = this._IBase_StoreService.GetStoreByCode(id);
            model.AccountList    = this._IBase_AccountService.GetAccountByIDNo(id);
            model.RealestateList = this._IBase_RealestateService.GetRealestateByIDNo(id);
            return(View(model));
        }
Exemplo n.º 9
0
        public JsonResult Realestate(ProfileComplexModel model)
        {
            if (ModelState.IsValid)
            {
                if (string.IsNullOrWhiteSpace(model.Realestate.IDNo))
                {
                    return(Json(new MessageResult {
                        Status = false, Message = "身份证号码不能为空"
                    }));
                }
                var car = this._IBase_RealestateService.Create(model.Realestate);

                return(Json(new MessageResult {
                    Status = true, Message = "创建成功"
                }));
            }

            return(Json(new MessageResult {
                Status = false, Message = ModelState.GetErrorMsg()
            }));
        }
Exemplo n.º 10
0
        public JsonResult Create(ProfileComplexModel model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    this._IBase_ProfileServicel.Create(model.Profile);
                }
                catch (Exception e)
                {
                    return(Json(new MessageResult {
                        Status = false, Message = e.InnerException.InnerException.Message
                    }));
                }
                return(Json(new MessageResult {
                    Status = true, Message = "创建成功"
                }));
            }

            return(Json(new MessageResult {
                Status = false, Message = ModelState.GetErrorMsg()
            }));
        }
Exemplo n.º 11
0
        public JsonResult RealestateEdit(ProfileComplexModel model)
        {
            if (ModelState.IsValid)
            {
                if (string.IsNullOrWhiteSpace(model.Realestate.IDNo))
                {
                    return(Json(new MessageResult {
                        Status = false, Message = "身份证号码不能为空"
                    }));
                }
                var car = this._IBase_RealestateService.Update(new List <Ingenious.DTO.Base_RealestateDTO> {
                    model.Realestate
                });

                return(Json(new MessageResult {
                    Status = true, Message = "编辑成功"
                }));
            }

            return(Json(new MessageResult {
                Status = false, Message = ModelState.GetErrorMsg()
            }));
        }