/// <summary> /// 保存数据 /// </summary> /// <param name="model"></param> /// <returns></returns> public JsonResult SaveLandBlock(LandBlockModel model) { var result = new ResultJson(); try { var msg = new MessageModel(); if (model.BlockID == 0) { _landBlock.InsertSingleLandBlock(model); } else { _landBlock.UpdateSingleLandBlock(model); } if (msg.Status == MessageStatus.Success) { result.IsSuccess = true; } } catch (Exception) { } return(Json(result)); }
public void Save() { if (Mode == EditMode.CREATE) { landBlockService.InsertSingleLandBlock(Model); } else if (Mode == EditMode.UPDATE) { landBlockService.UpdateSingleLandBlock(Model); } var win = GetView() as System.Windows.Window; if (win != null) { win.DialogResult = true; win.Close(); } }