Пример #1
0
 public new void ProcessRequest(System.Web.HttpContext context)
 {
     try
     {
         this.modeId = context.Request.Form["ModelId"];
         string a;
         if ((a = this.modeId) != null)
         {
             if (!(a == "editeadvertslide"))
             {
                 if (!(a == "editeadvertimage"))
                 {
                     if (!(a == "editelogo"))
                     {
                         if (a == "editeadvertcustom")
                         {
                             string text = context.Request.Form["Param"];
                             if (text != "")
                             {
                                 JavaScriptObject advertcustomobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(text);
                                 if (this.CheckAdvertCustom(advertcustomobject) && this.UpdateAdvertCustom(advertcustomobject))
                                 {
                                     var AnonymousType = new
                                     {
                                         AdCustom = new Common_CustomAd
                                         {
                                             AdId = System.Convert.ToInt32(this.elementId)
                                         }.RendHtml()
                                     };
                                     this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(AnonymousType));
                                 }
                             }
                         }
                     }
                     else
                     {
                         string text2 = context.Request.Form["Param"];
                         if (text2 != "")
                         {
                             JavaScriptObject javaScriptObject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(text2);
                             if (this.CheckLogo(javaScriptObject) && this.UpdateLogo(javaScriptObject))
                             {
                                 Common_Logo common_Logo    = new Common_Logo();
                                 var         AnonymousType2 = new
                                 {
                                     LogoUrl = common_Logo.RendHtml()
                                 };
                                 this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(AnonymousType2));
                             }
                         }
                     }
                 }
                 else
                 {
                     string text3 = context.Request.Form["Param"];
                     if (text3 != "")
                     {
                         JavaScriptObject advertimageobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(text3);
                         if (this.CheckAdvertImage(advertimageobject) && this.UpdateAdvertImage(advertimageobject))
                         {
                             var AnonymousType3 = new
                             {
                                 AdImage = new Common_ImageAd
                                 {
                                     AdId = System.Convert.ToInt32(this.elementId)
                                 }.RendHtml()
                             };
                             this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(AnonymousType3));
                         }
                     }
                 }
             }
             else
             {
                 string text4 = context.Request.Form["Param"];
                 if (text4 != "")
                 {
                     JavaScriptObject avdvertobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(text4);
                     if (this.CheckAdvertSlide(avdvertobject) && this.UpdateAdvertSlide(avdvertobject))
                     {
                         var AnonymousType4 = new
                         {
                             AdSlide = new Common_SlideAd
                             {
                                 AdId = System.Convert.ToInt32(this.elementId)
                             }.RendHtml()
                         };
                         this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(AnonymousType4));
                     }
                 }
             }
         }
     }
     catch (System.Exception ex)
     {
         this.message = "{\"success\":false,\"Result\":\"未知错误:" + ex.Message + "\"}";
     }
     context.Response.ContentType = "text/json";
     context.Response.Write(this.message);
 }
Пример #2
0
        public new void ProcessRequest(HttpContext context)
        {
            try
            {
                this.modeId = context.Request.Form["ModelId"];
                string text = this.modeId;
                switch (text)
                {
                default:
                    if (text == "editeadvertcustom")
                    {
                        string text4 = context.Request.Form["Param"];
                        if (text4 != "")
                        {
                            JObject advertcustomobject = (JObject)JsonConvert.DeserializeObject(text4);
                            if (this.CheckAdvertCustom(advertcustomobject) && this.UpdateAdvertCustom(advertcustomobject))
                            {
                                Common_CustomAd common_CustomAd = new Common_CustomAd();
                                common_CustomAd.AdId = Convert.ToInt32(this.elementId);
                                var value3 = new
                                {
                                    AdCustom = common_CustomAd.RendHtml()
                                };
                                this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value3));
                            }
                        }
                    }
                    break;

                case "editeadvertslide":
                {
                    string text5 = context.Request.Form["Param"];
                    if (text5 != "")
                    {
                        JObject avdvertobject = (JObject)JsonConvert.DeserializeObject(text5);
                        if (this.CheckAdvertSlide(avdvertobject) && this.UpdateAdvertSlide(avdvertobject))
                        {
                            Common_SlideAd common_SlideAd = new Common_SlideAd();
                            common_SlideAd.AdId = Convert.ToInt32(this.elementId);
                            var value4 = new
                            {
                                AdSlide = common_SlideAd.RendHtml()
                            };
                            this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value4));
                        }
                    }
                    break;
                }

                case "editeadvertimage":
                {
                    string text3 = context.Request.Form["Param"];
                    if (text3 != "")
                    {
                        JObject advertimageobject = (JObject)JsonConvert.DeserializeObject(text3);
                        if (this.CheckAdvertImage(advertimageobject) && this.UpdateAdvertImage(advertimageobject))
                        {
                            Common_ImageAd common_ImageAd = new Common_ImageAd();
                            common_ImageAd.AdId = Convert.ToInt32(this.elementId);
                            var value2 = new
                            {
                                AdImage = common_ImageAd.RendHtml()
                            };
                            this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value2));
                        }
                    }
                    break;
                }

                case "editelogo":
                {
                    string text2 = context.Request.Form["Param"];
                    if (text2 != "")
                    {
                        JObject jObject = (JObject)JsonConvert.DeserializeObject(text2);
                        if (this.CheckLogo(jObject) && this.UpdateLogo(jObject))
                        {
                            Common_Logo common_Logo = new Common_Logo();
                            var         value       = new
                            {
                                LogoUrl = common_Logo.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);
        }
Пример #3
0
 public new void ProcessRequest(System.Web.HttpContext context)
 {
     try
     {
         this.modeId = context.Request.Form["ModelId"];
         string a;
         if ((a = this.modeId) != null)
         {
             if (!(a == "editeadvertslide"))
             {
                 if (!(a == "editeadvertimage"))
                 {
                     if (!(a == "editelogo"))
                     {
                         if (a == "editeadvertcustom")
                         {
                             string text = context.Request.Form["Param"];
                             if (text != "")
                             {
                                 JObject advertcustomobject = (JObject)JsonConvert.DeserializeObject(text);
                                 if (this.CheckAdvertCustom(advertcustomobject) && this.UpdateAdvertCustom(advertcustomobject))
                                 {
                                     var value = new
                                     {
                                         AdCustom = new Common_CustomAd
                                         {
                                             AdId = System.Convert.ToInt32(this.elementId)
                                         }.RendHtml()
                                     };
                                     this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value));
                                 }
                             }
                         }
                     }
                     else
                     {
                         string text2 = context.Request.Form["Param"];
                         if (text2 != "")
                         {
                             JObject jObject = (JObject)JsonConvert.DeserializeObject(text2);
                             if (this.CheckLogo(jObject) && this.UpdateLogo(jObject))
                             {
                                 Common_Logo common_Logo = new Common_Logo();
                                 var         value2      = new
                                 {
                                     LogoUrl = common_Logo.RendHtml()
                                 };
                                 this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value2));
                             }
                         }
                     }
                 }
                 else
                 {
                     string text3 = context.Request.Form["Param"];
                     if (text3 != "")
                     {
                         JObject advertimageobject = (JObject)JsonConvert.DeserializeObject(text3);
                         Dictionary <string, string> common_ImageNewAdCtrAttr;
                         if (this.CheckAdvertImage(advertimageobject) && this.UpdateAdvertImage(advertimageobject, context, out common_ImageNewAdCtrAttr))
                         {
                             var value3 = new
                             {
                                 AdImage = new Common_ImageNewAd
                                 {
                                     AdId     = this.elementId,
                                     ImgStyle = common_ImageNewAdCtrAttr != null ? common_ImageNewAdCtrAttr["ImgStyle"]:"",
                                     DivCss   = common_ImageNewAdCtrAttr != null ? common_ImageNewAdCtrAttr["DivCss"] : ""
                                 }.RendHtml()
                             };
                             this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value3));
                         }
                     }
                 }
             }
             else
             {
                 string text4 = context.Request.Form["Param"];
                 if (text4 != "")
                 {
                     JObject avdvertobject = (JObject)JsonConvert.DeserializeObject(text4);
                     if (this.CheckAdvertSlide(avdvertobject) && this.UpdateAdvertSlide(avdvertobject))
                     {
                         var value4 = new
                         {
                             AdSlide = new Common_SlideAd
                             {
                                 AdId = System.Convert.ToInt32(this.elementId)
                             }.RendHtml()
                         };
                         this.message = string.Format(this.resultformat, "true", JsonConvert.SerializeObject(value4));
                     }
                 }
             }
         }
     }
     catch (System.Exception ex)
     {
         this.message = "{\"success\":false,\"Result\":\"未知错误:" + ex.Message + "\"}";
     }
     context.Response.ContentType = "text/json";
     context.Response.Write(this.message);
 }
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                string str2;
                string str3;
                string str4;
                this.modeId = context.Request.Form["ModelId"];
                string modeId = this.modeId;
                if (modeId != null)
                {
                    if (!(modeId == "editeadvertslide"))
                    {
                        if (modeId == "editeadvertimage")
                        {
                            goto Label_00FD;
                        }
                        if (modeId == "editelogo")
                        {
                            goto Label_0196;
                        }
                        if (modeId == "editeadvertcustom")
                        {
                            goto Label_021D;
                        }
                    }
                    else
                    {
                        string str = context.Request.Form["Param"];
                        if (str != "")
                        {
                            JavaScriptObject avdvertobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(str);
                            if (this.CheckAdvertSlide(avdvertobject) && this.UpdateAdvertSlide(avdvertobject))
                            {
                                Common_SlideAd ad = new Common_SlideAd();
                                ad.AdId = Convert.ToInt32(this.elementId);
                                var type = new {
                                    AdSlide = ad.RendHtml()
                                };
                                this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(type));
                            }
                        }
                    }
                }
                goto Label_02CA;
Label_00FD:
                str2 = context.Request.Form["Param"];
                if (str2 != "")
                {
                    JavaScriptObject advertimageobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(str2);
                    if (this.CheckAdvertImage(advertimageobject) && this.UpdateAdvertImage(advertimageobject))
                    {
                        Common_ImageAd ad2 = new Common_ImageAd();
                        ad2.AdId = Convert.ToInt32(this.elementId);
                        var type2 = new {
                            AdImage = ad2.RendHtml()
                        };
                        this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(type2));
                    }
                }
                goto Label_02CA;
Label_0196:
                str3 = context.Request.Form["Param"];
                if (str3 != "")
                {
                    JavaScriptObject logoobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(str3);
                    if (this.CheckLogo(logoobject) && this.UpdateLogo(logoobject))
                    {
                        Common_Logo logo  = new Common_Logo();
                        var         type3 = new {
                            LogoUrl = logo.RendHtml()
                        };
                        this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(type3));
                    }
                }
                goto Label_02CA;
Label_021D:
                str4 = context.Request.Form["Param"];
                if (str4 != "")
                {
                    JavaScriptObject advertcustomobject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(str4);
                    if (this.CheckAdvertCustom(advertcustomobject) && this.UpdateAdvertCustom(advertcustomobject))
                    {
                        Common_CustomAd ad3 = new Common_CustomAd();
                        ad3.AdId = Convert.ToInt32(this.elementId);
                        var type4 = new {
                            AdCustom = ad3.RendHtml()
                        };
                        this.message = string.Format(this.resultformat, "true", JavaScriptConvert.SerializeObject(type4));
                    }
                }
            }
            catch (Exception exception)
            {
                this.message = "{\"success\":false,\"Result\":\"未知错误:" + exception.Message + "\"}";
            }
Label_02CA:
            context.Response.ContentType = "text/json";
            context.Response.Write(this.message);
        }