public JsonResult Edit(BusinessPayConfig model)
        {
            try
            {
                if (model.BusinessPayConfigId > 0)
                {
                    var entity = _BusinessPayConfigService.GetById(model.BusinessPayConfigId);
                    //修改
                    entity.Name = model.Name;

                    //执行更新
                    _BusinessPayConfigService.Update(entity);
                }
                else
                {
                    //新增
                    model.CreateTime = DateTime.Now;

                    _BusinessPayConfigService.Insert(model);
                }
            }
            catch (Exception)
            {
                return(Json(new { Status = Successed.Error, Info = Successed.Error.ToString() }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new { Status = Successed.Ok }, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
 /// <summary>
 /// 删除实体
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public void Delete(BusinessPayConfig model)
 {
     this._repoBusinessPayConfig.Delete(model);
 }
Beispiel #3
0
 /// <summary>
 /// 修改实体
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public void Update(BusinessPayConfig model)
 {
     this._repoBusinessPayConfig.Update(model);
 }
Beispiel #4
0
 public BusinessPayConfig Insert(BusinessPayConfig model)
 {
     return(this._repoBusinessPayConfig.Insert(model));
 }
 /// <summary>
 /// 删除实体
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public void Delete(BusinessPayConfig model)
 {
     this._BusinessPayConfigBiz.Delete(model);
 }
 /// <summary>
 /// 修改实体
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public void Update(BusinessPayConfig model)
 {
     this._BusinessPayConfigBiz.Update(model);
 }
 /// <summary>
 /// 添加实体
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public BusinessPayConfig Insert(BusinessPayConfig model)
 {
     return(this._BusinessPayConfigBiz.Insert(model));
 }