Exemplo n.º 1
0
        /// <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));
        }
Exemplo n.º 2
0
        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();
            }
        }