public override void ProcessActivity(WebRequest request, WebResponse response)
        {
            switch (request.SendValue)
            {
            case "AnimImage":

                var uiview = new UIView();
                uiview.Style.Width("80%");
                uiview.Src = new Uri("http://www.365lu.cn/UserResources/1usm4ih/1599785635641/red_packet_bg.png");

                uiview.Add("https://data.kukahome.com/css/images/logo.png", new UIStyle().Name("top", "-20%").Name("width", "25%").Name("border-radius", "50%").Name("border-width", "5%").Name("border-color", "#fff"));


                var style = new UIStyle().Name("top", "30%").Name("width", "30%");

                style.Name("clicked").Name("animation-name", "reverse");
                style.Name("animation-name", "scale");

                uiview.Add(new UIClick("Date").Send(request.Model, request.Command), new Uri("http://www.365lu.cn/UserResources/1usm4ih/1599785654433/icon_open_red_packet1.png"), style);

                uiview.Add("牛人啊,请玩红包", new UIStyle().Color(0xfff).Size(30).Name("width", "80%"));
                this.Context.Send("UIView", new WebMeta().Put("view", uiview), true);
                break;

            case "Date":
                this.AsyncDialog("D", "none");
                this.AsyncDialog("Datec", g =>
                {
                    return(UIDateDialog.CreateDialog("Time"));
                });
                return;;
            }
            var form  = request.SendValues ?? new UMC.Web.WebMeta();
            var start = Utility.IntParse(form["start"], 0);
            var limit = Utility.IntParse(form["limit"], 1000);

            if (form.ContainsKey("limit") == false)
            {
                this.Context.Send(new UISectionBuilder(request.Model, request.Command, request.Arguments)
                                  .RefreshEvent("Builder")
                                  .Builder(), true);
            }

            var videoSrc = new Uri("http://2449.vod.myqcloud.com/2449_22ca37a6ea9011e5acaaf51d105342e3.f20.mp4");
            var ui       = UISection.Create(new UITitle("Demo"));

            if (start == 0)
            {
                UIView coustomCell = new UIView("UMC_User");

                coustomCell.Style.Name("width", "50%");
                coustomCell.Src = new Uri("http://www.365lu.cn/UserResources/1usm4ih/1599785635641/red_packet_bg.png");
                coustomCell.Add("image", new Uri("http://www.365lu.cn/UserResources/1usm4ih/1599785654433/icon_open_red_packet1.png"), new UIStyle().Name("width", "20%").Name("animation-name", "reverse"));
                coustomCell.Add("Text", "你好啊,是不是很好呢", new UIStyle().Name("left", "10").AlignLeft());
                ui.Componen.Add(coustomCell);
                ui.UIHeader = new UIHeader().Coustom(coustomCell);
            }

            var footer = new UIFootBar();

            footer.AddText(new UIEventText("w磊").Style(new UIStyle().Fixed().BgColor().Name("margin", "10").Name("border-radius", "10")));
            ui.UIFootBar   = footer;
            footer.IsFixed = true;
            var uIIcon = new UIIconNameDesc(new UIIconNameDesc.Item('\uF02d', "知识创作", "1篇").Color(0x36a3f7));

            ui.Add(uIIcon);
            uIIcon.Button("图片动画", new UIClick("AnimImage").Send(request.Model, request.Command), 0x36a3f7);
            uIIcon.Style.Name("fixed", "true");
            var text = new UITextDesc(new WebMeta().Put("title", "TextDesc使用说明", "desc", "格式属性title、desc、tag", "tag", "122"));

            text.Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/TextDesc"), true));
            ui.Add(text);
            var cell = UICell.Create("UMC_User", new WebMeta().Put("Text", "失人啊").Put("image", "https://www.baidu.com/img/flexible/logo/pc/result.png"));

            cell.Style.Name("Text").Color(0x05d);
            ui.Add(cell);

            var imge = new UIImageTextDesc(new WebMeta().Put("title", "ImageTextDesc使用说明", "desc", "格式属性title、desc、tag", "tag", "122", "right", "right").Put("src", "https://data.kukahome.com/css/images/logo.png"));

            imge.Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/ImageTextDesc"), true));
            ui.Add(imge);
            var cmT = new UICMSImage("https://data.kukahome.com/css/images/logo.png");

            cmT.Style.Name("width", "60%").AlignLeft().Padding(10);
            ui.Add(cmT);

            var d = new UITextNameValue("Name", "Text", "Value ");

            d.Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/TextNameValue"), true));
            ui.Add(d);

            var img2e = new UIImageTextDescTime(new WebMeta().Put("tag", "I12", "text", "ImageTextDescTime组件", "desc", "desc格式", "time", "time格式", "right", "right").Put("src", "https://data.kukahome.com/css/images/logo.png"));

            img2e.Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/ImageTextDescTime"), true));
            ui.Add(img2e);

            UIImageTextValue imageTextValue = new UIImageTextValue("https://data.kukahome.com/css/images/logo.png", "ImageTextValue组件", "Value格式");

            imageTextValue.Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/ImageTextValue"), true));
            ui.Add(imageTextValue);


            UI ui3 = new UI("UI组件", "Value格式");

            ui3.Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/UI"), true));
            ui3.Icon('\uf013', 0x4CAF50);
            ui.Add(ui3);
            //UIIconNameDesc iconNameDesc = new UIIconNameDesc(new UIIconNameDesc.Item("UI组件", "desc"));
            ui.Add(new UIIconNameDesc(new UIIconNameDesc.Item("UI组件", "desc").Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/IconNameDesc"), true))));
            ui.Add(new UIIconNameDesc(new UIIconNameDesc.Item("https://data.kukahome.com/css/images/logo.png", "UI组件", "desc").Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/IconNameDesc"), true))));
            ui.Add(new UIIconNameDesc(new UIIconNameDesc.Item("https://data.kukahome.com/css/images/logo.png", "UI组件", "desc")
                                      .Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/IconNameDesc"), true))).Button("关注", Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/IconNameDesc"), true), 0x1890ff));

            ui.Add(new UIIconNameDesc(new UIIconNameDesc.Item("https://data.kukahome.com/css/images/logo.png", "UI组件", "desc"), new UIIconNameDesc.Item("https://data.kukahome.com/css/images/logo.png", "UI组件", "desc").Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/IconNameDesc"), true))));
            var dis = new UIDiscount(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/IconNameDesc"), true));

            dis.Title("UIDiscount优惠券组件");
            dis.State("有效");
            dis.Value("5元");
            dis.Desc("超级优惠券");
            dis.Start("2020.12.1");
            dis.End("2020.12.1");
            ui.Add(dis);


            var look = new UICMSLook("https://data.kukahome.com/css/images/logo.png", "CMSLook组件", "desc");

            look.Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/IconNameDesc"), true));

            ui.Add(look);
            var v = new UISheet("UISheet组件");

            v.AddItem("CMSLook组件", "desc");
            v.AddItem("CMSLook组件", "desc", true);
            //  var look2 = new UIItemText("CMSLook组件", "desc");
            //  look2.Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/IconNameDesc"), true));

            ui.Add(v);

            var uiitems = new UIItems();

            uiitems.Add("https://data.kukahome.com/css/images/logo.png", "Title", "desc", 0xff2, 0xff0000);
            uiitems.Add("https://data.kukahome.com/css/images/logo.png", "Title", "desc", 0xff2, 0xff0000);
            uiitems.Add("https://data.kukahome.com/css/images/logo.png", "Title", "desc", 0xff2, 0xff0000);
            uiitems.Add("https://data.kukahome.com/css/images/logo.png", "UIItems", "UIItems");
            //uiitems.Add("https://data.kukahome.com/css/images/logo.png", "UIItems", "UIItems");
            //dis.Click()
            ui.Add(uiitems);
            UINineImage nineImage = new UINineImage();

            nineImage.Add("https://data.kukahome.com/css/images/logo.png");
            nineImage.Add("https://data.kukahome.com/css/images/logo.png");
            nineImage.Add("https://www.365lu.cn/css/images/center_left.svg");
            nineImage.Click(Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", "UMC/Rows/IconNameDesc"), true));
            ui.Add(nineImage);
            ui.Add(new Web.UI.UIIcon().Add(new UIEventText('\ue906', "Iicon").Badge("12323"), new UIEventText("Iicon").Src("https://data.kukahome.com/css/images/logo.png"), new UIEventText("Iicon").Src("https://data.kukahome.com/css/images/logo.png").Badge("1")));

            UITitleMore more = new UITitleMore("Slider");
            var         tab  = new UITabFixed();

            tab.Add("列组", "1");

            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add("列组", "1");
            tab.Add(new UIClick()
            {
                Text = "在的呢"
            });
            ui.Add(tab);
            var cms = new UICMS(new WebMeta().Put("title", "列组"), videoSrc, "https://data.kukahome.com/css/images/logo.png");

            cms.Left("imy");
            cms.Right("imy");
            ui.Add(cms);
            var cmsImage = new UICMSImage(videoSrc, "https://data.kukahome.com/css/images/logo.png");

            cmsImage.Style.Name("width", "60%").AlignLeft();
            var ui2     = ui.NewSection().Add(more).Add(cmsImage);
            var seilder = new UISlider();

            seilder.Add(videoSrc, "https://data.kukahome.com/css/images/logo.png");
            //seilder.Add("https://data.kukahome.com/css/images/logo.png");/
            seilder.Small();
            ui2.Add(seilder);
            seilder = new UISlider(true);
            seilder.Add("https://data.kukahome.com/css/images/logo.png");
            seilder.Add("https://data.kukahome.com/css/images/logo.png");
            // seilder.Small();
            ui2.Add(seilder);
            seilder = new UISlider();
            seilder.Add("https://data.kukahome.com/css/images/logo.png");
            //seilder.Add("https://data.kukahome.com/css/images/logo.png");
            seilder.Row();
            ui2.Add(seilder);
            UITextItems textItems = new UITextItems();

            textItems.Add(new UIEventText("232323").Style(new UIStyle().BgColor()), new UIEventText("安装").Style(new UIStyle().BgColor()), new UIEventText("安装"), new UIEventText("安装"));
            textItems.Add(new UIEventText("232323"), new UIEventText("安装"), new UIEventText("安装"), new UIEventText("sdsdsfsdfsdfsd").Style(new UIStyle().BgColor()));
            textItems.Add(new UIEventText("232323").Style(new UIStyle().BgColor()), new UIEventText("dsdsd"), new UIEventText("sdsdsd"), new UIEventText("sdsdsd").Style(new UIStyle().BgColor()));

            ui2.Add(textItems);
            UIButton button = new UIButton();

            button.Button(new UIEventText("安装").Badge("1d"));
            button.Style.AlignCenter();
            ui.NewSection().Add(button);
            ui.Title.Right(new UIEventText('\uf2e1', "33d").Click(new UIClick()
            {
                Key = "Float"
            }));                                                                                    //.Badge("21"));
            response.Redirect(ui);
        }
Example #2
0
        public static void Search(UISection ui, Data.Sql.IObjectEntity <Subject> subEntity, String model, String cmd, int start, int limit, bool isblock)
        {
            var subs    = new List <Subject>();
            var cateids = new List <Guid>();
            var ids     = new List <Guid>();
            var itemIds = new List <Guid>();

            var search = UMC.Data.Reflection.CreateInstance <Subject>();

            search.DataJSON  = null;
            search.Content   = null;
            search.ConfigXml = null;
            subEntity.Query(search, start, limit, dr =>
            {
                subs.Add(dr);
                if (dr.project_id.HasValue)
                {
                    cateids.Add(dr.project_id ?? Guid.Empty);
                }
                ids.Add(dr.Id.Value);
                if (dr.project_item_id.HasValue)
                {
                    itemIds.Add(dr.project_item_id.Value);
                }
            });
            var cates  = new List <Project>();
            var pitems = new List <Data.Entities.ProjectItem>();


            if (itemIds.Count > 0)
            {
                Utility.CMS.ObjectEntity <ProjectItem>().Where.And().In(new ProjectItem
                {
                    Id = itemIds[0]
                }, itemIds.ToArray())
                .Entities.Query(dr => pitems.Add(dr));
            }
            if (cateids.Count > 0)
            {
                Utility.CMS.ObjectEntity <Project>().Where.And().In(new Project {
                    Id = cateids[0]
                }, cateids.ToArray())
                .Entities.Query(dr => cates.Add(dr));
            }
            var pics = new List <UMC.Data.Entities.Picture>();

            if (ids.Count > 0)
            {
                Utility.CMS.ObjectEntity <Data.Entities.Picture>().Where.And().In(new Data.Entities.Picture
                {
                    group_id = ids[0]
                }, ids.ToArray()).Entities.Order.Asc(new Data.Entities.Picture {
                    Seq = 0
                }).Entities.Query(g => pics.Add(g));
            }
            ;
            var items = ui;
            var webr  = UMC.Data.WebResource.Instance();


            foreach (var sub in subs)
            {
                if (sub.Visible == 0)
                {
                    continue;
                }
                var ims = new List <UMC.Data.Entities.Picture>();
                pics.RemoveAll(g =>
                {
                    if (g.group_id == sub.Id)
                    {
                        ims.Add(g);
                        return(true);
                    }
                    return(false);
                });
                var imgs = new List <String>();

                if (ims.Count > 0)
                {
                    switch (ims.Count)
                    {
                    case 2:
                    case 1:

                        imgs.Add(webr.ResolveUrl(sub.Id.Value, 1, "0") + "!cms" + ((sub.IsPicture ?? false) ? "1" : "3") + "?_ts=" + UMC.Data.Utility.TimeSpan(ims[0].UploadDate.Value));

                        break;

                    default:
                        for (var i = 0; i < 3; i++)
                        {
                            imgs.Add(webr.ResolveUrl(sub.Id.Value, ims[i].Seq ?? 0, "0") + "!cms3?_ts=" + UMC.Data.Utility.TimeSpan(ims[i].UploadDate.Value));
                        }
                        break;
                    }
                }
                var click = new Web.UIClick(sub.Id.ToString()).Send(model, cmd);
                var data  = new UMC.Web.WebMeta().Put("title", sub.Title).Put("reply", (sub.Reply ?? 0).ToString()).Put("look", (sub.Look ?? 0).ToString());


                var cate  = cates.Find(g => g.Id == sub.project_id);
                var pitem = pitems.Find(g => g.Id == sub.project_item_id);
                data.Put("pname", cate == null ? "草稿" : cate.Caption);
                if (sub.project_id == sub.user_id)
                {
                    data.Put("iname", "");
                }
                else
                {
                    data.Put("iname", pitem == null ? "" : pitem.Caption);
                }
                data.Put("time", Utility.GetDate(sub.ReleaseDate));
                if (cate != null && pitem != null)
                {
                    data.Put("spa", new WebMeta().Put("id", sub.Id).Put("path", String.Format("{0}/{1}/{2}", cate.Code, pitem.Code, sub.Code)));
                }
                else
                {
                    data.Put("sub-id", Utility.Guid(sub.Id.Value));//.Put("path", String.Format("{0}/{1}/{2}", cate.Code, pitem.Code, sub.Code)));
                }
                data.Put("desc", sub.Description);
                UICell cell;
                switch (imgs.Count)
                {
                case 0:
                    cell = new UICMS(click, data);
                    break;

                default:
                    cell = (sub.IsPicture ?? false) ? new UICMS(click, data, imgs[0], true) : (ims.Count > 2 ? new UICMS(click, data, imgs[0], imgs[1], imgs[2]) : new UICMS(click, data, imgs[0]));


                    break;
                }
                cell.Format.Put("left", "{pname} {iname} {time}");
                cell.Style.Name("licon", new UIStyle().Size(12).Font("wdk")).Name("ricon", new UIStyle().Size(12).Font("wdk"));
                cell.Style.Name("pname").Color(0x777);
                cell.Style.Name("iname").Color(0x777);
                if (isblock)
                {
                    cell.Style.Name("block").Size(12).Color(0xaaa).Font("wdk").Click(UIClick.Click(new UIClick("Id", sub.Id.ToString(), "Type", "Block").Send(model, "TipOff")));
                    data.Put("block", "\uea0d");

                    cell.Format.Put("right", "\uF06E{1:licon} {look}   \uF0E6{1:ricon} {reply}  {2:block}");
                }
                else
                {
                    cell.Format.Put("right", "\uF06E{1:licon} {look}   \uF0E6{1:ricon} {reply}");
                }
                items.Add(cell);
            }
            ui.Total = subEntity.Count();;
        }
        public override void ProcessActivity(WebRequest request, WebResponse response)
        {
            var user = UMC.Security.Identity.Current;

            if (user.IsAuthenticated == false)
            {
                if (request.IsApp)
                {
                    response.Redirect("Account", "Login");
                }
                else
                {
                    this.Prompt("请登录");
                }
            }
            var subEntity = Utility.CMS.ObjectEntity <UMC.Data.Entities.Subject>();


            var sId = this.AsyncDialog("Id", ag =>
            {
                var form = request.SendValues ?? new UMC.Web.WebMeta();
                if (form.ContainsKey("limit") == false)
                {
                    this.Context.Send(new UISectionBuilder(request.Model, request.Command)

                                      .RefreshEvent("Subject.Apply")
                                      .Builder(), true);
                }

                subEntity.Where.And().Equal(new Subject {
                    Status = 0, Visible = 1
                });

                var webr = UMC.Data.WebResource.Instance();

                int limit = UMC.Data.Utility.IntParse(form["limit"] as string, 25);
                int start = UMC.Data.Utility.IntParse(form["start"] as string, 0);

                string sort = form[("sort")] as string;
                string dir  = form[("dir")] as string;

                var category = form["Category"] as string;
                var model    = request.Model;

                //subEntity.Where.And().In("category_id", Utility.CMS.ObjectEntity/*<Category>().Where.And().Equal(new Category { user_id = user.Id }).Entities.Script(new Category { Id = Guid.Empty }));*/
                var pics = new List <UMC.Data.Entities.Picture>();

                Guid?CategoryId = UMC.Data.Utility.Guid(category);

                var Keyword = (form["Keyword"] as string ?? String.Empty);
                if (CategoryId.HasValue)
                {
                    subEntity.Where.And().Equal(new Data.Entities.Subject {
                        category_id = CategoryId
                    });
                }

                if (String.IsNullOrEmpty(Keyword) == false)
                {
                    subEntity.Where.And().Like(new Subject {
                        Title = Keyword
                    });
                }


                if (!String.IsNullOrEmpty(sort))
                {
                    if (dir == "DESC")
                    {
                        subEntity.Order.Desc(sort);
                    }
                    else
                    {
                        subEntity.Order.Asc(sort);
                    }
                }
                else
                {
                    subEntity.Order.Desc(new Subject {
                        ReleaseDate = DateTime.Now
                    });
                }
                var subs    = new List <Subject>();
                var cateids = new List <Guid>();
                var ids     = new List <Guid>();
                subEntity.Query(start, limit, dr =>
                {
                    subs.Add(dr);
                    cateids.Add(dr.category_id ?? Guid.Empty);
                    ids.Add(dr.Id.Value);
                });
                //var cates = new List<Category>();
                //if (ids.Count > 0)
                //{
                //    Utility.CMS.ObjectEntity<Category>().Where.And().In(new Category { Id = Guid.Empty }, cateids.ToArray())
                //       .Entities.Query(dr => cates.Add(dr));
                //    Data.Database.Instance().ObjectEntity<Data.Entities.Picture>().Where.And().In(new Data.Entities.Picture { group_id = ids[0] }, ids.ToArray())
                //       .Entities.Order.Asc(new Data.Entities.Picture { Seq = 0 }).Entities.Query(g => pics.Add(g));
                //}

                var ui = UISection.Create();
                if (start == 0)
                {
                    ui.Title = new UITitle("我的版务");
                }

                foreach (var sub in subs)
                {
                    var ims = new List <UMC.Data.Entities.Picture>();
                    pics.RemoveAll(g =>
                    {
                        if (g.group_id == sub.Id)
                        {
                            ims.Add(g);
                            return(true);
                        }
                        return(false);
                    });
                    var imgs = new List <String>();

                    if (ims.Count > 0)
                    {
                        switch (ims.Count)
                        {
                        case 2:
                        case 1:

                            imgs.Add(webr.ResolveUrl(sub.Id.Value, 1, "0") + "!cms" + ((sub.IsPicture ?? false) ? "1" : "3") + "?_ts=" + UMC.Data.Utility.TimeSpan(ims[0].UploadDate.Value));

                            break;

                        default:
                            for (var i = 0; i < 3; i++)
                            {
                                imgs.Add(webr.ResolveUrl(sub.Id.Value, ims[i].Seq ?? 0, "0") + "!cms3?_ts=" + UMC.Data.Utility.TimeSpan(ims[i].UploadDate.Value));
                            }
                            break;
                        }
                    }
                    var hash = new System.Collections.Hashtable();
                    var cate = cates.Find(g => g.Id == sub.category_id);
                    if (cate != null)
                    {
                        hash["id"]   = cate.Id;
                        hash["text"] = cate.Caption;
                    }
                    else
                    {
                        hash["text"] = "未分类";
                    }

                    var click = Web.UIClick.Pager("Subject", "UIData", new UMC.Web.WebMeta().Put("Id", sub.Id));
                    var data  = new UMC.Web.WebMeta().Put("title", sub.Title).Put("reply", sub.Reply ?? 0).Put("look", sub.Look ?? 0)
                                .Put("left", cate == null ? "未分类" : cate.Caption);
                    UICell cell;
                    switch (imgs.Count)
                    {
                    case 0:
                        cell = UICMS.CreateMax(click, data);
                        break;

                    default:
                        cell = (sub.IsPicture ?? false) ? UICMS.CreateMax(click, data, imgs[0]) : (ims.Count > 2 ? UICMS.CreateThree(click, data, imgs.ToArray()) : UICMS.CreateOne(click, data, imgs[0]));


                        break;
                    }

                    cell.Style.Name("licon", new UIStyle().Size(12).Font("wdk")).Name("ricon", new UIStyle().Size(12).Font("wdk"));
                    cell.Format.Put("right", "\uF06E{1:licon} {look}   \uF0E6{1:ricon} {reply}");
                    ui.Add(cell);
                }
                ui.Total = subEntity.Count();
                if (ui.Total == 0)
                {
                    ui.Add("Desc", new UMC.Web.WebMeta().Put("desc", "还未有需要审核的版务").Put("icon", "\uF016"), new UMC.Web.WebMeta().Put("desc", "{icon}\n{desc}"),

                           new UIStyle().Align(1).Color(0xaaa).Padding(20, 20).BgColor(0xfff).Size(12).Name("icon", new UIStyle().Font("wdk").Size(60)));
                }
                response.Redirect(ui);
                return(this.DialogValue("none"));
            });

            var Type = this.AsyncDialog("Type", g =>
            {
                var shett = new Web.UISheetDialog()
                {
                    Title = "图文版务"
                };
                shett.Options.Add(new UIClick(new UMC.Web.WebMeta(request.Arguments.GetDictionary()).Put("Type", "OK"))
                {
                    Model = request.Model, Command = request.Command, Text = "审核通过"
                });
                shett.Options.Add(new UIClick(new UMC.Web.WebMeta(request.Arguments.GetDictionary()).Put("Type", "Reject"))
                {
                    Model = request.Model, Command = request.Command, Text = "驳回重写"
                });
                return(shett);
            });
            var usub = new Subject();

            usub.Status = Type == "OK" ? 1 : -2;

            var strs    = new string[] { "内容低俗", "过度营销", "不符合社会价值观", "法律禁止" };
            var appdesc = Utility.IntParse(this.AsyncDialog("Desc", g =>
            {
                if (Type == "OK")
                {
                    return(this.DialogValue("-1"));
                }
                var shett = new Web.UISelectDialog()
                {
                    Title = "驳回原因"
                };
                shett.Options.Put(strs[0], "0").Put(strs[1], "1").Put(strs[2], "2");
                return(shett);
            }), -1);

            if (appdesc > -1)
            {
                usub.AppDesc = strs[appdesc];
            }
            if (usub.Status > 0)
            {
                usub.LastDate    = DateTime.Now;
                usub.ReleaseDate = DateTime.Now;
            }
            else
            {
                usub.LastDate = DateTime.Now;
            }
            subEntity.Where.And().Equal(new Subject {
                Id = Utility.Guid(sId, true)
            })
            .Entities.Update(usub);
            this.Context.Send("Subject.Apply", true);
        }