public ActionResult Update(ZhuZhaiLouDongXiuZheng entity) { if (ModelState.IsValid) { entity.LastModifiedBy = GetCurrentUserName(); entity.LastModifiedDate = DateTime.Now; _service.UpdateZhuZhaiLouDongXiuZheng(entity); _service.Save(); var window = this.GetCmp <Window>(ExtHelper.windowZhuZhaiLouDongXiuZheng.ToString()); window.Hide(); this.GetCmp <Store>(ExtHelper.storeZhuZhaiLouDongXiuZheng.ToString()).Reload(); return(this.Direct()); } return(this.Direct()); }
public ActionResult SaveMarkerLouDong(int id, double ptX, double ptY) { if (ptX == 0 || ptY == 0) { return(this.Direct()); } var uow = RepositoryHelper.GetUnitOfWork(); var service = new ZhuZhaiService(uow); var entity = service.GetZhuZhaiLouDongXiuZhengById(id); if (entity != null) { entity.JingWeiDu = string.Format("{0},{1}", ptX, ptY); service.UpdateZhuZhaiLouDongXiuZheng(entity); service.Save(); return(this.Direct()); } return(this.Direct()); }