예제 #1
0
        public override void DataBind()
        {
            VTemplate.Engine.RepeatTag tag = this.Tag as VTemplate.Engine.RepeatTag;
            if (tag == null)
            {
                return;
            }
            //
            int    count  = tag.Count;
            int    start  = int.Parse(this.Tag.Attributes.GetValue("start", "0")); //起始索引号
            string search = this.Tag.Attributes.GetValue("search", "");            //检索字符
            //上级专业的id
            int pid = 0;

            int.TryParse(this.Tag.Attributes.GetValue("pid", "-1"), out pid);
            //排序方式,def默认排序(先推荐,后排序号),tax按排序号,rec按推荐
            string order = this.Tag.Attributes.GetValue("order", "def");


            //数据来源
            Song.Entities.Subject[] sbjs = Business.Do <ISubject>().SubjectCount(this.Organ.Org_ID, search, true, pid, order, start, count);
            foreach (Song.Entities.Subject c in sbjs)
            {
                c.Sbj_Logo      = Upload.Get["Subject"].Virtual + c.Sbj_Logo;
                c.Sbj_LogoSmall = Upload.Get["Subject"].Virtual + c.Sbj_LogoSmall;
                c.Sbj_Intro     = HTML.ClearTag(c.Sbj_Intro);
            }
            List <Song.Template.Tags.TreeObject> list = Song.Template.Tags.TreeObject.Bulder(sbjs, "Sbj_PID", "0", "Sbj_ID");

            tag.DataSourse = list;
        }
예제 #2
0
        public override void DataBind()
        {
            VTemplate.Engine.RepeatTag tag = this.Tag as VTemplate.Engine.RepeatTag;
            if (tag == null)
            {
                return;
            }

            int couid = int.Parse(this.Tag.Attributes.GetValue("couid", "-1"));  //所属课程的id

            Song.Entities.KnowledgeSort[] sorts = Business.Do <IKnowledge>().GetSortAll(-1, couid, true);
            //
            List <Song.Template.Tags.TreeObject> list = Song.Template.Tags.TreeObject.Bulder(sorts, "Kns_PID", "0", "Kns_ID");

            tag.DataSourse = list;
        }
예제 #3
0
        public override void DataBind()
        {
            VTemplate.Engine.RepeatTag tag = this.Tag as VTemplate.Engine.RepeatTag;
            if (tag == null)
            {
                return;
            }
            //
            //菜单是学生的,还是教师的,还是管理员的;
            //例如教师管理teacher,学生管理student,机构管理organAdmin
            string marker = this.Tag.Attributes.GetValue("marker", "");

            if (string.IsNullOrWhiteSpace(marker))
            {
                return;
            }
            //数据来源
            Song.Entities.ManageMenu[]           mms  = Business.Do <IPurview>().GetAll4Org(this.Organ.Org_ID, marker);
            List <Song.Template.Tags.TreeObject> list = Song.Template.Tags.TreeObject.Bulder(mms, "MM_PatId", "0", "MM_Id");

            tag.DataSourse = list;
        }