public void ProcessRequest(HttpContext context) { try { this.modeId = context.Request.Form["ModelId"]; string categorys = ""; string productBrand = ""; string productTags = ""; switch (this.modeId) { case "simpleview": this.message = string.Format(this.resultformat, "true", this.GetSimpleProductView()); goto Label_059E; case "editesimple": { string str4 = context.Request.Form["Param"]; if (str4 != "") { JavaScriptObject simpleobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(str4); if (this.CheckSimpleProduct(simpleobject) && this.UpdateSimpleProduct(simpleobject)) { Common_SubjectProduct_Simple simple = new Common_SubjectProduct_Simple(); simple.SubjectId = Convert.ToInt32(this.elementId); var typea = new { Simple = simple.RendHtml() }; this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(typea)); } } goto Label_059E; } case "producttabview": { categorys = this.GetCategorys(); productBrand = this.GetProductBrand(); productTags = this.GetProductTags(); string str5 = "{\"Categorys\":" + categorys + ",\"Brands\":" + productBrand + ",\"Tags\":" + productTags + "}"; this.message = string.Format(this.resultformat, "true", str5); goto Label_059E; } case "editeproducttab": { string str6 = context.Request.Form["Param"]; if (str6 != "") { JavaScriptObject tabobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(str6); if (this.CheckProductTab(tabobject) && this.UpdateProductTab(tabobject)) { Common_SubjectProduct_Tab tab = new Common_SubjectProduct_Tab(); tab.SubjectId = Convert.ToInt32(this.elementId); var typeb = new { ProductTab = tab.RendHtml() }; this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(typeb)); } } goto Label_059E; } case "productfloorview": { categorys = this.GetCategorys(); productBrand = this.GetProductBrand(); productTags = this.GetProductTags(); string str7 = "{\"Categorys\":" + categorys + ",\"Brands\":" + productBrand + ",\"Tags\":" + productTags + "}"; this.message = string.Format(this.resultformat, "true", str7); goto Label_059E; } case "editeproductfloor": { string str8 = context.Request.Form["Param"]; if (str8 != "") { JavaScriptObject floorobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(str8); if (this.CheckProductFloor(floorobject) && this.UpdateProductFloor(floorobject)) { Common_SubjectProduct_Floor floor = new Common_SubjectProduct_Floor(); floor.SubjectId = Convert.ToInt32(this.elementId); var typec = new { ProductFloor = floor.RendHtml() }; this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(typec)); } } goto Label_059E; } case "productgroupview": { categorys = this.GetCategorys(); string str9 = "{\"Categorys\":" + categorys + "}"; this.message = string.Format(this.resultformat, "true", str9); goto Label_059E; } case "editeproductgroup": { string str10 = context.Request.Form["Param"]; if (str10 != "") { JavaScriptObject groupobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(str10); if (this.CheckProductGroup(groupobject) && this.UpdateProductGroup(groupobject)) { Common_SubjectProduct_Group group = new Common_SubjectProduct_Group(); group.SubjectId = Convert.ToInt32(this.elementId); var typed = new { ProductGroup = group.RendHtml() }; this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(typed)); } } goto Label_059E; } case "producttopview": { categorys = this.GetCategorys(); string str11 = "{\"Categorys\":" + categorys + "}"; this.message = string.Format(this.resultformat, "true", str11); goto Label_059E; } case "editeproducttop": { string str12 = context.Request.Form["Param"]; if (str12 != "") { JavaScriptObject topobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(str12); if (this.CheckProductTop(topobject) && this.UpdateProductTop(topobject)) { Common_SubjectProduct_Top top = new Common_SubjectProduct_Top(); top.SubjectId = Convert.ToInt32(this.elementId); var typee = new { ProductTop = top.RendHtml() }; this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(typee)); } } goto Label_059E; } } } catch (Exception exception) { this.message = "{\"success\":false,\"Result\":\"未知错误:" + exception.Message + "\"}"; } Label_059E: context.Response.ContentType = "text/json"; context.Response.Write(this.message); }
public new void ProcessRequest(HttpContext context) { try { this.modeId = context.Request.Form["ModelId"]; string text = ""; string text2 = ""; string text3 = ""; switch (this.modeId) { case "simpleview": this.message = string.Format(this.resultformat, "true", this.GetSimpleProductView()); break; case "editesimple": { string text7 = context.Request.Form["Param"]; if (text7 != "") { JObject simpleobject = (JObject)JsonConvert.DeserializeObject(text7); if (this.CheckSimpleProduct(simpleobject) && this.UpdateSimpleProduct(simpleobject)) { Common_SubjectProduct_Simple common_SubjectProduct_Simple = new Common_SubjectProduct_Simple(); common_SubjectProduct_Simple.SubjectId = Convert.ToInt32(this.elementId); var value4 = new { Simple = common_SubjectProduct_Simple.RendHtml() }; this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value4)); } } break; } case "producttabview": { text = this.GetCategorys(); text2 = this.GetProductBrand(); text3 = this.GetProductTags(); string arg3 = "{\"Categorys\":" + text + ",\"Brands\":" + text2 + ",\"Tags\":" + text3 + "}"; this.message = string.Format(this.resultformat, "true", arg3); break; } case "editeproducttab": { string text5 = context.Request.Form["Param"]; if (text5 != "") { JObject jObject = (JObject)JsonConvert.DeserializeObject(text5); if (this.CheckProductTab(jObject) && this.UpdateProductTab(jObject)) { Common_SubjectProduct_Tab common_SubjectProduct_Tab = new Common_SubjectProduct_Tab(); common_SubjectProduct_Tab.SubjectId = Convert.ToInt32(this.elementId); var value2 = new { ProductTab = common_SubjectProduct_Tab.RendHtml() }; this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value2)); } } break; } case "productfloorview": { text = this.GetCategorys(); text2 = this.GetProductBrand(); text3 = this.GetProductTags(); string arg = "{\"Categorys\":" + text + ",\"Brands\":" + text2 + ",\"Tags\":" + text3 + "}"; this.message = string.Format(this.resultformat, "true", arg); break; } case "editeproductfloor": { string text6 = context.Request.Form["Param"]; if (text6 != "") { JObject floorobject = (JObject)JsonConvert.DeserializeObject(text6); if (this.CheckProductFloor(floorobject) && this.UpdateProductFloor(floorobject)) { Common_SubjectProduct_Floor common_SubjectProduct_Floor = new Common_SubjectProduct_Floor(); common_SubjectProduct_Floor.SubjectId = Convert.ToInt32(this.elementId); var value3 = new { ProductFloor = common_SubjectProduct_Floor.RendHtml() }; this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value3)); } } break; } case "producttopview": { text = this.GetCategorys(); string arg2 = "{\"Categorys\":" + text + "}"; this.message = string.Format(this.resultformat, "true", arg2); break; } case "editeproducttop": { string text4 = context.Request.Form["Param"]; if (text4 != "") { JObject topobject = (JObject)JsonConvert.DeserializeObject(text4); if (this.CheckProductTop(topobject) && this.UpdateProductTop(topobject)) { Common_SubjectProduct_Top common_SubjectProduct_Top = new Common_SubjectProduct_Top(); common_SubjectProduct_Top.SubjectId = Convert.ToInt32(this.elementId); var value = new { ProductTop = common_SubjectProduct_Top.RendHtml() }; this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value)); } } break; } } } catch (Exception ex) { this.message = "{\"success\":false,\"Result\":\"未知错误:" + ex.Message + "\"}"; } context.Response.ContentType = "text/json"; context.Response.Write(this.message); }