Exemplo n.º 1
0
 // Token: 0x0600009F RID: 159 RVA: 0x0000F068 File Offset: 0x0000D268
 protected override void View()
 {
     this.channelinfo = ChannelBll.GetChannelInfo(this.channelid);
     if (this.channelinfo.id == 0)
     {
         this.ShowErr("考试频道不存在或已被删除。");
     }
     else
     {
         this.sortlist = SortBll.GetSortList(this.channelid, 0);
         List <SqlParam> list = new List <SqlParam>();
         list.Add(DbHelper.MakeAndWhere("status", 1));
         if (this.channelid > 0)
         {
             list.Add(DbHelper.MakeAndWhere("channelid", this.channelid));
         }
         if (this.sortid > 0)
         {
             string childSorts = SortBll.GetChildSorts(this.sortid);
             list.Add(DbHelper.MakeAndWhere("sortid", WhereType.In, childSorts));
         }
         if (FPUtils.IsNumericArray(this.typeid))
         {
             StringBuilder stringBuilder = new StringBuilder();
             foreach (int num in FPUtils.SplitInt(this.typeid))
             {
                 if (!string.IsNullOrEmpty(stringBuilder.ToString()))
                 {
                     stringBuilder.Append(" OR ");
                 }
                 stringBuilder.AppendFormat("(','+[typelist]+',') LIKE '%,{0},%'", num);
             }
             list.Add(DbHelper.MakeAndWhere("(" + stringBuilder.ToString() + ")", WhereType.Custom, ""));
         }
         list.Add(DbHelper.MakeAndWhere(string.Format("(([examroles]='' AND [examdeparts]='' AND [examuser]='') OR (','+[examroles]+',') LIKE '%,{0},%' OR (','+[examdeparts]+',') LIKE '%,{1},%' OR (','+[examuser]+',') LIKE '%,{2},%')", this.roleid, this.departid, this.userid), WhereType.Custom, ""));
         this._examlist = DbHelper.ExecuteList <ExamInfo>(this.pager, list.ToArray());
         this.pagenav   = this.channelinfo.name;
     }
 }
Exemplo n.º 2
0
        // Token: 0x06000053 RID: 83 RVA: 0x00004E70 File Offset: 0x00003070
        public static List <ChannelInfo> GetChannelList(string idmarkup)
        {
            OrderByParam       orderby = DbHelper.MakeOrderBy("display", OrderBy.ASC);
            List <ChannelInfo> result;

            if (FPUtils.IsNumericArray(idmarkup))
            {
                SqlParam sqlParam = DbHelper.MakeAndWhere("id", WhereType.In, idmarkup);
                result = DbHelper.ExecuteList <ChannelInfo>(orderby, new SqlParam[]
                {
                    sqlParam
                });
            }
            else
            {
                SqlParam sqlParam = DbHelper.MakeAndWhere("markup", WhereType.Like, idmarkup);
                result = DbHelper.ExecuteList <ChannelInfo>(orderby, new SqlParam[]
                {
                    sqlParam
                });
            }
            return(result);
        }