private void GetUserCustomGroup(HttpContext context) { context.Response.ContentType = "application/json"; try { new StringBuilder(); IList <CustomGroupingInfo> customGroupingList = CustomGroupingHelper.GetCustomGroupingList(); List <CustomGroup> list2 = new List <CustomGroup>(); if (customGroupingList.Count > 0) { foreach (CustomGroupingInfo info in customGroupingList) { CustomGroup item = new CustomGroup { id = info.Id, Name = info.GroupName }; list2.Add(item); } } var type = new { type = "success", data = list2 }; string s = JsonConvert.SerializeObject(type); context.Response.Write(s); } catch (Exception exception) { context.Response.Write("{\"type\":\"error\",data:\"" + exception.Message + "\"}"); } }
private void GetUserCustomGroupAndGrade(HttpContext context) { context.Response.ContentType = "application/json"; try { new StringBuilder(); IList <CustomGroupingInfo> customGroupingList = CustomGroupingHelper.GetCustomGroupingList(); List <CustomGroup> list2 = new List <CustomGroup>(); if (customGroupingList.Count > 0) { foreach (CustomGroupingInfo info in customGroupingList) { CustomGroup item = new CustomGroup { id = info.Id, Name = info.GroupName }; list2.Add(item); } } new StringBuilder(); IList <MemberGradeInfo> memberGrades = MemberHelper.GetMemberGrades(); List <SimpleGradeClass> list4 = new List <SimpleGradeClass>(); if (memberGrades.Count > 0) { foreach (MemberGradeInfo info2 in memberGrades) { SimpleGradeClass class2 = new SimpleGradeClass { GradeId = info2.GradeId, Name = info2.Name }; list4.Add(class2); } } var type = new { type = "success", data = list2, gradedata = list4 }; string s = JsonConvert.SerializeObject(type); context.Response.Write(s); } catch (Exception exception) { context.Response.Write("{\"type\":\"error\",data:\"" + exception.Message + "\"}"); } }
protected string GetModelMemberCustomGroup() { StringBuilder builder = new StringBuilder(); IList <CustomGroupingInfo> customGroupingList = CustomGroupingHelper.GetCustomGroupingList(); if ((customGroupingList != null) && (customGroupingList.Count > 0)) { foreach (CustomGroupingInfo info in customGroupingList) { builder.Append(" <label class=\"middle mr20\">"); builder.AppendFormat("<input type=\"checkbox\" class=\"ModelCustomGroup\" value=\"{0}\">{1}", info.Id, info.GroupName); builder.Append(" </label>"); } } return(builder.ToString()); }
protected string GetMemberCustomGroup() { StringBuilder builder = new StringBuilder(); IList <CustomGroupingInfo> customGroupingList = CustomGroupingHelper.GetCustomGroupingList(); if ((customGroupingList != null) && (customGroupingList.Count > 0)) { foreach (CustomGroupingInfo info in customGroupingList) { builder.Append(" <label class=\"middle mr20\">"); builder.AppendFormat("<input type=\"checkbox\" class=\"CustomGroup\" value=\"{0}\">{1}", info.Id, info.GroupName); builder.Append(" </label>"); } } else { builder.Append("暂无分组信息,去<a href='../member/CustomDistributorList.aspx'>创建新分组</a>"); } return(builder.ToString()); }
protected string GetMemberCustomGroup() { System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); System.Collections.Generic.IList <CustomGroupingInfo> customGroupingList = CustomGroupingHelper.GetCustomGroupingList(); if (customGroupingList != null && customGroupingList.Count > 0) { foreach (CustomGroupingInfo current in customGroupingList) { if (current.Id != this.currentGroupId) { stringBuilder.Append(" <label class=\"middle mr20\">"); stringBuilder.AppendFormat("<input type=\"checkbox\" class=\"CustomGroup\" value=\"{0}\">{1}", current.Id, current.GroupName); stringBuilder.Append(" </label>"); } } } return(stringBuilder.ToString()); }
public string GetMemberGarde(string applyMembers, string defualtGroup, string customGroup) { StringBuilder builder = new StringBuilder(); if (!string.IsNullOrEmpty(applyMembers)) { IList <MemberGradeInfo> memberGrades = null; if (applyMembers == "0") { memberGrades = MemberHelper.GetMemberGrades(); } else { memberGrades = MemberHelper.GetMemberGrades(applyMembers); } if ((memberGrades != null) && (memberGrades.Count > 0)) { foreach (MemberGradeInfo info in memberGrades) { builder.Append(info.Name + ","); } } } if (!string.IsNullOrEmpty(customGroup)) { IList <CustomGroupingInfo> customGroupingList = null; if (customGroup == "0") { customGroupingList = CustomGroupingHelper.GetCustomGroupingList(); } else { customGroupingList = CustomGroupingHelper.GetCustomGroupingList(customGroup); } if ((customGroupingList != null) && (customGroupingList.Count > 0)) { foreach (CustomGroupingInfo info2 in customGroupingList) { builder.Append(info2.GroupName + ","); } } } if (!string.IsNullOrEmpty(defualtGroup)) { if (defualtGroup.IndexOf('1') > -1) { builder.Append("新会员,"); } if (defualtGroup.IndexOf('2') > -1) { builder.Append("活跃会员,"); } if (defualtGroup.IndexOf('3') > -1) { builder.Append("沉睡会员,"); } } if (!string.IsNullOrEmpty(builder.ToString())) { return(builder.ToString().Substring(0, builder.Length - 1)); } return(""); }
private void GetUserCustomGroup(System.Web.HttpContext context) { context.Response.ContentType = "application/json"; try { new System.Text.StringBuilder(); System.Collections.Generic.IList <CustomGroupingInfo> customGroupingList = CustomGroupingHelper.GetCustomGroupingList(); System.Collections.Generic.List <CustomGroup> list = new System.Collections.Generic.List <CustomGroup>(); if (customGroupingList.Count > 0) { foreach (CustomGroupingInfo current in customGroupingList) { list.Add(new CustomGroup { id = current.Id, Name = current.GroupName }); } } var value = new { type = "success", data = list }; string s = JsonConvert.SerializeObject(value); context.Response.Write(s); } catch (System.Exception ex) { context.Response.Write("{\"type\":\"error\",data:\"" + ex.Message + "\"}"); } }
protected string GetMemberCustomGroup() { System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); System.Collections.Generic.IList <CustomGroupingInfo> customGroupingList = CustomGroupingHelper.GetCustomGroupingList(); if (customGroupingList != null && customGroupingList.Count > 0) { using (System.Collections.Generic.IEnumerator <CustomGroupingInfo> enumerator = customGroupingList.GetEnumerator()) { while (enumerator.MoveNext()) { CustomGroupingInfo current = enumerator.Current; stringBuilder.Append(" <label class=\"middle mr20\">"); stringBuilder.AppendFormat("<input type=\"checkbox\" class=\"CustomGroup\" value=\"{0}\">{1}", current.Id, current.GroupName); stringBuilder.Append(" </label>"); } goto IL_7D; } } stringBuilder.Append("暂无分组信息,去<a href='../member/CustomDistributorList.aspx'>创建新分组</a>"); IL_7D: return(stringBuilder.ToString()); }
public string GetMemberGarde(string applyMembers, string defualtGroup, string customGroup) { System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(applyMembers)) { System.Collections.Generic.IList <MemberGradeInfo> memberGrades; if (applyMembers == "0") { memberGrades = MemberHelper.GetMemberGrades(); } else { memberGrades = MemberHelper.GetMemberGrades(applyMembers); } if (memberGrades != null && memberGrades.Count > 0) { foreach (MemberGradeInfo current in memberGrades) { stringBuilder.Append(current.Name + ","); } } } if (!string.IsNullOrEmpty(defualtGroup) && defualtGroup != "-1") { if (defualtGroup == "0") { stringBuilder.Append("新会员,活跃会员,沉睡会员,"); } else { if (defualtGroup.IndexOf('1') > -1) { stringBuilder.Append("新会员,"); } if (defualtGroup.IndexOf('2') > -1) { stringBuilder.Append("活跃会员,"); } if (defualtGroup.IndexOf('3') > -1) { stringBuilder.Append("沉睡会员,"); } } } if (!string.IsNullOrEmpty(customGroup)) { System.Collections.Generic.IList <CustomGroupingInfo> list = null; if (customGroup == "0") { list = CustomGroupingHelper.GetCustomGroupingList(); } else if (customGroup != "-1") { list = CustomGroupingHelper.GetCustomGroupingList(customGroup); } if (list != null && list.Count > 0) { foreach (CustomGroupingInfo current2 in list) { stringBuilder.Append(current2.GroupName + ","); } } } if (!string.IsNullOrEmpty(stringBuilder.ToString())) { return(Globals.SubStr(stringBuilder.ToString().Substring(0, stringBuilder.Length - 1), 60, "...")); } return(""); }