public ActionResult SaveResourceInfo(MaterialProductModel model)
        {
            var resultMode = new ResponseBaseModel <dynamic>
            {
                ResultCode = ResponceCodeEnum.Success,
                Message    = "响应成功"
            };
            var server    = new MaterialProductService();
            var saveModel = new MaterialProductModel();

            if (model == null)
            {
                Debug.WriteLine("请求参数为空");
                resultMode.Message    = "保存失败";
                resultMode.ResultCode = ResponceCodeEnum.Fail;
                return(Json(resultMode, JsonRequestBehavior.AllowGet));
            }
            if (model.Id > 0)
            {
                saveModel = server.Get(model.Id);
                if (saveModel == null)
                {
                    resultMode.Message    = "该记录已经被删除";
                    resultMode.ResultCode = ResponceCodeEnum.Fail;
                    return(Json(resultMode, JsonRequestBehavior.AllowGet));
                }
            }
            else
            {
                saveModel.CreateBy   = CurrentModel.Id.ToString();
                saveModel.CreateTime = DateTime.Now;
            }

            saveModel.Id                 = model.Id;
            saveModel.IsDel              = FlagEnum.HadZore.GetHashCode();
            saveModel.ResourceRemark     = model.ResourceRemark;
            saveModel.ProductName        = model.ProductName;
            saveModel.ProductResourceUrl = model.ProductResourceUrl;
            saveModel.Sort               = model.Sort;
            saveModel.ProductType        = model.ProductType;
            try
            {
                server.SaveModel(saveModel);
                return(Json(resultMode, JsonRequestBehavior.AllowGet));
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
                resultMode.Message    = "保存失败";
                resultMode.ResultCode = ResponceCodeEnum.Fail;
                resultMode.Data       = e.Message;
                return(Json(resultMode, JsonRequestBehavior.AllowGet));
            }
        }
 /// <summary>
 /// 保存信息
 /// </summary>
 /// <param name="saveModel"></param>
 public void SaveModel(MaterialProductModel saveModel)
 {
     _dataAccess.SaveModel(saveModel);
 }