/// <summary> /// 添加更新分类 /// </summary> /// <param name="context"></param> /// <returns></returns> private string ADScoreTypeInfo(HttpContext context) { string autoId = context.Request["AutoId"]; string typeName = context.Request["TName"]; string typeImg = context.Request["TypeImg"]; if (string.IsNullOrEmpty(autoId)) { autoId = "0"; } BLLJIMP.Model.WXMallScoreTypeInfo model = bllJuactivity.Get <BLLJIMP.Model.WXMallScoreTypeInfo>(string.Format(" AutoId={0}", autoId)); if (model != null) { model.TypeName = typeName; model.TypeImg = typeImg; model.websiteOwner = bll.WebsiteOwner; bool isSuccess = bllJuactivity.Update(model); if (isSuccess) { resp.Status = 0; resp.Msg = "修改成功"; } else { resp.Status = -1; resp.Msg = "修改失败"; } } else { model = new BLLJIMP.Model.WXMallScoreTypeInfo() { TypeName = typeName, TypeImg = typeImg, websiteOwner = bll.WebsiteOwner }; bool isSuccess = bllJuactivity.Add(model); if (isSuccess) { resp.Status = 0; resp.Msg = "添加成功。"; } else { resp.Status = 0; resp.Msg = "添加失败。"; } } return(Common.JSONHelper.ObjectToJson(resp)); }
/// <summary> /// 获取分类详细信息 /// </summary> /// <param name="context"></param> /// <returns></returns> private string GetScoreTypeInfo(HttpContext context) { string autoId = context.Request["Autoid"]; if (string.IsNullOrEmpty(autoId)) { resp.Status = -1; resp.Msg = "系统错误请联系管理员"; goto OutF; } BLLJIMP.Model.WXMallScoreTypeInfo model = bllJuactivity.Get <BLLJIMP.Model.WXMallScoreTypeInfo>(string.Format(" AutoId={0}", autoId)); if (model != null) { resp.Msg = ""; resp.Status = 0; resp.ExObj = model; } OutF: return(Common.JSONHelper.ObjectToJson(resp)); }