public ActionResult Add(Epm_AdTarget model) { ResultView <int> view = new ResultView <int>(); //表单校验 if (string.IsNullOrEmpty(model.Name)) { view.Flag = false; view.Message = "广告位名称不能为空"; return(Json(view)); } if (string.IsNullOrEmpty(model.TargetNum)) { view.Flag = false; view.Message = "广告位编号不能为空"; return(Json(view)); } if (model.ShowCount <= 0) { view.Flag = false; view.Message = "显示数量不能为零"; return(Json(view)); } if (model.Hight <= 0) { view.Flag = false; view.Message = "高度不能为零"; return(Json(view)); } if (model.Lenght <= 0) { view.Flag = false; view.Message = "长度不能为零"; return(Json(view)); } if (Convert.ToBoolean(Request.Form["State"]) == true) { model.State = 1; } else { model.State = 0; } Result <int> result = new Result <int>(); using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request))) { result = proxy.AddAdTarget(model); } return(Json(result.ToResultView())); }
/// <summary> /// 修改广告位 /// </summary> /// <param name="model"></param> /// <returns></returns> public Result <int> UpdateAdTarget(Epm_AdTarget model) { return(base.Channel.UpdateAdTarget(model)); }
/// <summary> /// 添加广告位 /// </summary> /// <param name="model"></param> /// <returns></returns> public Result <int> AddAdTarget(Epm_AdTarget model) { return(base.Channel.AddAdTarget(model)); }