public ActionResult Edit(int id) { if (id == -1) { X.Msg.Alert(MsgInfo.TI_SHI, MsgInfo.PLEASE_SELECT_ROW_TO_EDIT).Show(); return(this.Direct()); } return(new PartialViewResult { ViewName = ExtHelper.Edit.ToString(), Model = _service.GetZhuZhaiLouDongXiuZhengById(id) }); }
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()); }