public JsonResult UnionSiteCreate(UnUnionSite model) { var result = new Result() { StatusCode = -1 }; try { if (ModelState.IsValid) { var id = UnUnionSiteBo.Instance.Create(model); if (id > 0) { result.Status = true; result.StatusCode = 0; SysLog.Instance.Info(LogStatus.系统日志来源.后台, "添加联盟网站" + model.SiteName, LogStatus.系统日志目标类型.联盟网站, id, CurrentUser.Base.SysNo); } } else { result.Message = "联盟网站数据有误,请检查重试!"; } } catch (Exception ex) { result.Message = ex.Message; SysLog.Instance.Error(LogStatus.系统日志来源.后台, "添加联盟网站" + ex.Message, LogStatus.系统日志目标类型.联盟网站, CurrentUser.Base.SysNo, ex); } return(Json(result)); }
/// <summary> /// 初始化联盟网站页面数据 /// </summary> /// <param name="viewStyle">视图中下拉显示模式(true列表查看模式,false添加修改模式)</param> /// <param name="model">联盟网站实体</param> /// <returns></returns> /// <remarks>2013-09-06 周唐炬 创建</remarks> private void InitUnionSitePageViewData(bool viewStyle, UnUnionSite model) { var text = viewStyle ? "全部" : "请选择"; var item = new SelectListItem() { Text = text, Value = "", Selected = true }; var statusts = new List <SelectListItem>() { item }; EnumUtil.ToListItem <UnionStatus.联盟网站状态>(ref statusts); ViewBag.Status = model != null ? new SelectList(statusts, "Value", "Text", model.Status) : new SelectList(statusts, "Value", "Text"); }
/// <summary> /// 修改联盟网站 /// </summary> /// <param name="model">联盟网站实体</param> /// <returns>受影响行</returns> /// <remarks>2013-10-16 周唐炬 创建</remarks> public int Update(UnUnionSite model) { return(IUnUnionSiteDao.Instance.Update(model)); }
/// <summary> /// 创建联盟网站 /// </summary> /// <param name="model">联盟网站实体</param> /// <returns>受影响行</returns> /// <remarks>2013-10-16 周唐炬 创建</remarks> public int Create(UnUnionSite model) { return(IUnUnionSiteDao.Instance.Create(model)); }
/// <summary> /// 修改联盟网站 /// </summary> /// <param name="model">联盟网站实体</param> /// <returns>受影响行</returns> /// <remarks>2013-10-16 周唐炬 创建</remarks> public abstract int Update(UnUnionSite model);
/// <summary> /// 创建联盟网站 /// </summary> /// <param name="model">联盟网站实体</param> /// <returns>受影响行</returns> /// <remarks>2013-10-16 周唐炬 创建</remarks> public abstract int Create(UnUnionSite model);
/// <summary> /// 修改联盟网站 /// </summary> /// <param name="model">联盟网站实体</param> /// <returns>受影响行</returns> /// <remarks>2013-10-16 周唐炬 创建</remarks> public override int Update(UnUnionSite model) { return(Context.Update <UnUnionSite>("UnUnionSite", model).AutoMap(x => x.SysNo).Where(x => x.SysNo).Execute()); }
/// <summary> /// 创建联盟网站 /// </summary> /// <param name="model">联盟网站实体</param> /// <returns>受影响行</returns> /// <remarks>2013-10-16 周唐炬 创建</remarks> public override int Create(UnUnionSite model) { return(Context.Insert <UnUnionSite>("UnUnionSite", model).AutoMap(x => x.SysNo).ExecuteReturnLastId <int>("SysNo")); }