Ejemplo n.º 1
0
        /// <summary>
        /// 得到资源目录 html
        /// </summary>
        private StringBuilder GetResourceFolderHtml(DataTable dtGetResourceFolder, string strResource_Class)
        {
            StringBuilder strFolderHtml = new StringBuilder();
            DataView      dvw           = new DataView();

            dvw.Table = dtGetResourceFolder;
            strFolderHtml.Append("<div class='tree sidebar_menu'>");
            if (dtGetResourceFolder.Rows.Count == 0)
            {
                strFolderHtml.Append("<div class=\"text-center\">对不起,没有找到资源</div>");
            }
            else
            {
                string strBuyRe = string.Format(@" and Common_Dict_Id in( select [Subject] from dbo.ResourceFolder
where book_id in(select Book_Id from dbo.UserBuyResources where UserId='{0}') ) ", FloginUser.UserId);
                List <Model_Common_Dict> listDict = new BLL_Common_Dict().GetModelList("D_Type='7' " + strBuyRe + " order by D_Name ");
                foreach (var item in listDict)
                {
                    strFolderHtml.Append("<ul data-level='0'>");
                    strFolderHtml.Append("<li>");
                    strFolderHtml.AppendFormat("<div class=\"name\"> <i class='tree_btn fa'></i> <a href='##' onclick=\"ShowSubDocument('{0}','1')\">{1}</a></div>", item.Common_Dict_ID, item.D_Name);
                    strFolderHtml.Append(InitNavigationTree("0", strResource_Class, item.Common_Dict_ID, dvw));
                    strFolderHtml.Append("</li>");
                    strFolderHtml.Append("</ul>");
                }
            }

            strFolderHtml.Append("</div>");
            return(strFolderHtml);
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SchoolId = Request["SchoolId"].Filter();
     UserId   = Request["UserId"].Filter();
     if (!IsPostBack)
     {
         if (string.IsNullOrEmpty(UserId))
         {
             Response.Write("参数错误!");
         }
         else
         {
             user = bll_user.GetModel(UserId);
             DataTable dt       = new DataTable();
             string    strWhere = string.Empty;
             //学科
             strWhere = " D_Type='7' order by d_order";
             dt       = new BLL_Common_Dict().GetList(strWhere).Tables[0];
             Rc.Cloud.Web.Common.pfunction.SetDdlEmpty(ddlSubject, dt, "D_Name", "Common_Dict_ID", "--请选择--");
             //身份
             strWhere = " D_Type='15' order by d_order ";
             Rc.Cloud.Web.Common.pfunction.SetDdlEmpty(ddlUserPost, new BLL_Common_Dict().GetList(strWhere).Tables[0], "D_Name", "Common_Dict_ID", "--请选择--");
         }
     }
 }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt       = new DataTable();
                string    strWhere = string.Empty;
                //学科
                strWhere = " D_Type='7' order by d_order";
                dt       = new BLL_Common_Dict().GetList(strWhere).Tables[0];
                Rc.Cloud.Web.Common.pfunction.SetDdl(ddlSubject, dt, "D_Name", "Common_Dict_ID", "--请选择--");

                strWhere = " D_Type='15' order by d_order ";
                Rc.Cloud.Web.Common.pfunction.SetDdlEmpty(ddlUserPost, new BLL_Common_Dict().GetList(strWhere).Tables[0], "D_Name", "Common_Dict_ID", "");
            }
        }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     mtId             = Request["mtId"].Filter();
     parentId         = Request["parentId"].Filter();
     mtId_Copy        = Request["mtId_Copy"].Filter();
     GradeTerm        = Request["GradeTerm"].Filter();
     Subject          = Request["Subject"].Filter();
     Resource_Version = Request["Resource_Version"].Filter();
     if (!IsPostBack)
     {
         DataTable dtDict = new BLL_Common_Dict().GetList("D_Type=21 order by D_Order").Tables[0];
         Rc.Cloud.Web.Common.pfunction.SetDdl(ddlMTLevel, dtDict, "D_Name", "Common_Dict_Id", false);
         if (!string.IsNullOrEmpty(mtId) || !string.IsNullOrEmpty(mtId_Copy))
         {
             loadData();
         }
     }
 }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     kpId      = Request["kpId"].Filter();
     parentId  = Request["parentId"].Filter();
     kpId_Copy = Request["kpId_Copy"].Filter();
     GradeTerm = Request["GradeTerm"].Filter();
     Subject   = Request["Subject"].Filter();
     Syllabus  = Request["Syllabus"].Filter();
     Exam_Type = Request["Exam_Type"].Filter();
     if (!IsPostBack)
     {
         DataTable dtDict = new BLL_Common_Dict().GetList("D_Type=20 order by D_Order").Tables[0];
         Rc.Cloud.Web.Common.pfunction.SetDdl(ddlKPLevel, dtDict, "D_Name", "Common_Dict_Id", false);
         if (!string.IsNullOrEmpty(kpId) || !string.IsNullOrEmpty(kpId_Copy))
         {
             loadData();
         }
     }
 }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UserId = Request.QueryString["UserId"].ToString().Filter();
            if (!IsPostBack)
            {
                DataTable dt       = new DataTable();
                string    strWhere = string.Empty;
                //学科
                strWhere = " D_Type='7' order by d_order";
                dt       = new BLL_Common_Dict().GetList(strWhere).Tables[0];
                Rc.Cloud.Web.Common.pfunction.SetDdl(ddlSubject, dt, "D_Name", "Common_Dict_ID", "--请选择--");
                //职务
                strWhere = " D_Type='15' order by d_order ";
                Rc.Cloud.Web.Common.pfunction.SetDdlEmpty(ddlUserPost, new BLL_Common_Dict().GetList(strWhere).Tables[0], "D_Name", "Common_Dict_ID", "");

                if (!string.IsNullOrEmpty(UserId))
                {
                    loadData();
                }
            }
        }