Exemplo n.º 1
0
        /// <summary>
        /// 功能区域初始化
        /// </summary>
        public virtual void SogFunctionInit()
        {
            SogDiv SogFunction = new SogDiv();

            SogFunction.CssClass = "SogFunction";
            G_SogFunction        = SogFunction;
            Form.Controls.Add(SogFunction);

            SogSpan s1 = new SogSpan();

            s1.InnerText = "已选";
            G_SogFunction.Controls.Add(s1);

            SogSpan s2 = new SogSpan();

            s2.InnerText = "0";
            s2.CssClass  = "number";
            G_SogFunction.Controls.Add(s2);

            SogSpan s3 = new SogSpan();

            s3.InnerText = OBJECT.SO_ITEM_DESC;
            G_SogFunction.Controls.Add(s3);

            SogDeleteButton btn_delete = new SogDeleteButton();

            btn_delete.ID = "btn_delete";
            G_SogFunction.Controls.Add(btn_delete);
        }
Exemplo n.º 2
0
        /// <summary>
        ///头部区域初始化
        /// </summary>
        protected virtual void SogHeadInit()
        {
            SogDiv SogHead = new SogDiv();

            SogHead.CssClass = "SogHead";
            G_SogHead        = SogHead;
            Form.Controls.Add(SogHead);

            SogSpan SogTitle = new SogSpan();

            SogTitle.CssClass  = "SogTitle";
            SogTitle.InnerText = OBJECT.SO_TITLE;
            G_SogHead.Controls.Add(SogTitle);

            SogNavigate nv = NavigateInit();

            G_Navigate = nv;
            if (nv.DataSource.Count > 0)
            {
                G_SogHead.Controls.Add(nv);
            }

            SogDiv SogRight = new SogDiv();

            SogRight.CssClass = "SogRight";
            G_SogHead.Controls.Add(SogRight);

            if (OBJECT.SO_IS_ADD && COLUMNS_ADD.Count > 0)
            {
                SogSpan add_botton = new SogSpan();
                add_botton.CssClass  = "add_botton";
                add_botton.InnerText = "+";
                SogRight.Controls.Add(add_botton);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 内容区域初始化
        /// </summary>
        public virtual void SogContentInit()
        {
            SogDiv SogContent = new SogDiv();

            SogContent.CssClass = "SogContent";
            G_SogContent        = SogContent;
            Form.Controls.Add(SogContent);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 筛选区域初始化
        /// </summary>
        public virtual void SogConditionInit()
        {
            SogDiv SogCondition = new SogDiv();

            SogCondition.CssClass = "SogCondition";
            G_SogCondition        = SogCondition;
            Form.Controls.Add(SogCondition);

            SogDiv open = new SogDiv();

            open.CssClass = "open";
            open.Attributes.Add("style", "display: none;");
            SogCondition.Controls.Add(open);

            foreach (SYS_COLUMNS c in COLUMNS_SEARCH)
            {
                if (!string.IsNullOrEmpty(c.SC_CONTROL_DATA))
                {
                    condition_item obj_ci = new condition_item();
                    obj_ci.ID          = "search_" + c.SC_COLUMN_NAME;
                    obj_ci.HeadText    = c.SC_COLUMN_DESC;
                    obj_ci.target      = c.SC_COLUMN_NAME;
                    obj_ci.DataSource  = GetControlData(c.SC_CONTROL_DATA);
                    obj_ci.IsShowEmpty = true;
                    open.Controls.Add(obj_ci);
                }
            }

            List <SYS_COLUMNS> list = COLUMNS_SEARCH.Where(o => string.IsNullOrEmpty(o.SC_CONTROL_DATA) == true).ToList();

            if (list.Count > 0)
            {
                SogDiv condition_item = new SogDiv();
                condition_item.CssClass = "condition_item";
                condition_item.Attributes.Add("style", "padding-left:100px");
                open.Controls.Add(condition_item);

                SogTextSearch obj_SogTextSearch = new SogTextSearch();

                StringBuilder placeholder = new StringBuilder();
                StringBuilder target      = new StringBuilder();
                foreach (SYS_COLUMNS c in list)
                {
                    placeholder.Append("/" + c.SC_COLUMN_DESC);
                    target.Append("," + c.SC_COLUMN_NAME);
                }
                obj_SogTextSearch.placeholder = placeholder.ToString().Substring(1);
                obj_SogTextSearch.target      = "SogText";
                obj_SogTextSearch.CssClass    = "SogText";
                obj_SogTextSearch.ID          = "btn_search";
                condition_item.Controls.Add(obj_SogTextSearch);
            }


            SogDiv close = new SogDiv();

            close.CssClass = "close";
            SogCondition.Controls.Add(close);


            SogDiv condition_head = new SogDiv();

            condition_head.CssClass  = "condition_head";
            condition_head.InnerText = "筛选条件";
            close.Controls.Add(condition_head);

            foreach (SYS_COLUMNS c in COLUMNS_SEARCH)
            {
                if (!string.IsNullOrEmpty(c.SC_CONTROL_DATA))
                {
                    condition_desc d = new condition_desc();
                    d.HeadText = c.SC_COLUMN_DESC;
                    d.ParentID = "search_" + c.SC_COLUMN_NAME;
                    close.Controls.Add(d);
                }
            }

            SogDiv handler = new SogDiv();

            handler.CssClass = "handler";
            SogCondition.Controls.Add(handler);

            SogIcon obj_i = new SogIcon();

            obj_i.CssClass = "small_btn fa fa-chevron-down";

            handler.Controls.Add(obj_i);
        }