Ejemplo n.º 1
0
        private void bindEditInfo(ContentPost post)
        {
            set("post.DeleteUrl", to(Delete, post.Id));

            set("post.Author", post.Author);
            set("post.Title", post.Title);
            set("post.TitleHome", strUtil.EncodeTextarea(post.TitleHome));

            set("post.Width", post.Width);
            set("post.Height", post.Height);

            editor("Content", post.Content, "250px");

            set("post.Created", post.Created);
            set("post.Hits", post.Hits);
            set("post.OrderId", post.OrderId);

            set("post.RedirectUrl", post.RedirectUrl);
            set("post.MetaKeywords", post.MetaKeywords);
            set("post.MetaDescription", post.MetaDescription);


            set("post.Summary", post.Summary);
            set("post.SourceLink", post.SourceLink);
            set("post.Style", post.Style);

            set("post.TagList", post.Tag.TextString);
            String val = AccessStatusUtil.GetRadioList(post.AccessStatus);

            set("post.AccessStatus", val);
            set("post.IsCloseComment", Html.CheckBox("IsCloseComment", lang("closeComment"), "1", cvt.ToBool(post.CommentCondition)));

            radioList("PickStatus", PickStatus.GetPickStatus(), post.PickStatus.ToString());
        }
Ejemplo n.º 2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            PickStatus pickStatus = (PickStatus)value;

            if (pickStatus == PickStatus.New)
            {
                return("待拣选");
            }
            else if (pickStatus == PickStatus.Picking)
            {
                return("分拣中");
            }
            else if (pickStatus == PickStatus.Finished)
            {
                return("已完成");
            }
            else
            {
                return(string.Empty);
            }
        }
Ejemplo n.º 3
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            PickStatus pickStatus = (PickStatus)value;

            if (pickStatus == PickStatus.New)
            {
                return(Brushes.Black);
            }
            else if (pickStatus == PickStatus.Picking)
            {
                return(Brushes.Firebrick);
            }
            else if (pickStatus == PickStatus.Finished)
            {
                return(Brushes.ForestGreen);
            }
            else
            {
                return(Brushes.Black);
            }
        }
Ejemplo n.º 4
0
        public void Add(int sectionId)
        {
            target(to(Create) + "?categoryId=" + ctx.GetInt("categoryId") + "&fromList=" + ctx.GetInt("fromList"));

            List <ContentSection> sections = sectionService.GetInputSectionsByApp(ctx.app.Id);

            checkboxList("postSection", sections, "Title=Id", 0);

            set("created", DateTime.Now);

            set("sectionId", sectionId);

            set("width", ctx.GetInt("width"));
            set("height", ctx.GetInt("height"));

            set("uploadLink", to(new AttachmentController().SaveFlashFile)); // 接受上传的网址
            set("imgUploadLink", to(SavePic));                               //图片上传

            set("authJson", AdminSecurityUtils.GetAuthCookieJson(ctx));


            radioList("PickStatus", PickStatus.GetPickStatus(), "0");
        }