/// <summary>
        /// add by wangke 2016-11-23 绑定类别
        /// </summary>
        private void TreeBind()
        {
            BLL.Status          bll  = new BLL.Status();
            List <Model.Status> list = new List <Model.Status>();

            list = bll.GetCategory();

            this.ddl_category.Items.Clear();
            this.ddl_category.Items.Add(new ListItem("-- 请选择 --", ""));
            this.ddl_category1.Items.Add(new ListItem("-- 请选择 --", ""));
            foreach (Model.Status sta in list)
            {
                string YS_TYPE   = sta.YS_TYPE.ToString();
                string YS_REMARK = sta.YS_REMARK.ToString().Trim();

                this.ddl_category.Items.Add(new ListItem(YS_REMARK, YS_TYPE));
            }


            //BLL.Status bll = new BLL.Status();
            //List<Model.Status> list = new List<Model.Status>();
            //list = bll.GetList(ys_code);

            //this.ddl_category.Items.Clear();
            //this.ddl_category.Items.Add(new ListItem("所有类别", "0"));
            //foreach (Model.Status sta in list)
            //{
            //    string Id = sta.YS_ID.ToString();
            //    string Title = sta.YS_DESC.ToString().Trim();

            //    this.ddl_category.Items.Add(new ListItem(Title, Id));
            //}
        }
        /// <summary>
        /// 获取类型
        /// </summary>
        /// <param name="context"></param>
        private void GetCategory(HttpContext context)
        {
            string type = context.Request["type"].ToString();//类别ID

            BLL.Status bll  = new BLL.Status();
            DataTable  dt   = bll.GetStatusList("YS_TYPE='" + type + "'");
            string     json = Common.Function.ToJson(dt);

            context.Response.Write(json);
            return;
        }
Exemple #3
0
        protected void ddl_category_SelectedIndexChanged(object sender, EventArgs e)
        {
            string type = ddl_category.SelectedValue;

            BLL.Status bll = new BLL.Status();
            DataTable  dt  = bll.GetStatusList("YS_TYPE='" + type + "'");

            this.ddl_category1.Items.Clear();
            //this.ddl_category1.Items.Add(new ListItem("-- 请选择 --", ""));
            foreach (DataRow dr in dt.Rows)
            {
                string YS_ID   = dr["YS_ID"].ToString();
                string YS_DESC = dr["YS_DESC"].ToString().Trim();

                this.ddl_category1.Items.Add(new ListItem(YS_DESC, YS_ID));
            }
        }
Exemple #4
0
        /// <summary>
        /// add by wangke 2016-11-23 绑定类别
        /// </summary>
        /// <param name="ys_code"></param>
        private void TreeBind(string ys_code)
        {
            BLL.Status          bll  = new BLL.Status();
            List <Model.Status> list = new List <Model.Status>();

            list = bll.GetList(ys_code);

            this.ddl_category.Items.Clear();
            this.ddl_category.Items.Add(new ListItem("所有类别", "0"));
            foreach (Model.Status sta in list)
            {
                string Id    = sta.YS_ID.ToString();
                string Title = sta.YS_DESC.ToString().Trim();

                this.ddl_category.Items.Add(new ListItem(Title, Id));
            }
        }
Exemple #5
0
        /// <summary>
        /// 绑定类别
        /// </summary>
        /// <param name="ys_code"></param>
        private void TreeBind(string ys_code)
        {
            BLL.Status          bll  = new BLL.Status();
            List <Model.Status> list = new List <Model.Status>();

            list = bll.GetCategory();

            this.ddl_category.Items.Clear();
            this.ddl_category.Items.Add(new ListItem("-- 请选择 --", ""));
            this.ddl_category1.Items.Add(new ListItem("-- 请选择 --", ""));
            foreach (Model.Status sta in list)
            {
                string YS_TYPE   = sta.YS_TYPE.ToString();
                string YS_REMARK = sta.YS_REMARK.ToString().Trim();

                this.ddl_category.Items.Add(new ListItem(YS_REMARK, YS_TYPE));
            }
        }
        //获取题目类别
        public DataTable GetTitleCategory(int PapersID)
        {
            DataTable dtStatusId = new DataTable();

            dtStatusId = new BLL.PapersTitleList().GetList(PapersID);

            string statusId = "";

            if (dtStatusId.Rows.Count > 0)
            {
                foreach (DataRow item in dtStatusId.Rows)
                {
                    statusId += item["Status_id"].ToString() + ",";
                }
            }

            DataTable dt = new DataTable();

            BLL.Status bll = new BLL.Status();
            dt = bll.GetStatusList("YS_ID IN(" + Common.Function.DelLastComma(statusId) + ")");
            return(dt);
        }
        /// <summary>
        /// 获取题目类别
        /// </summary>
        public void GetTitleType(int PapersID)
        {
            DataTable dtStatusId = new DataTable();

            dtStatusId = new BLL.PapersTitleList().GetList(PapersID);
            StringBuilder strHtml  = new StringBuilder();
            StringBuilder sortHtml = new StringBuilder();

            string statusId = "";

            if (dtStatusId.Rows.Count > 0)
            {
                foreach (DataRow item in dtStatusId.Rows)
                {
                    statusId += item["Status_id"].ToString() + ",";
                }
            }

            DataTable dt = new DataTable();

            BLL.Status bll = new BLL.Status();
            dt = bll.GetStatusList("YS_ID IN(" + Common.Function.DelLastComma(statusId) + ")");
            if (dt.Rows.Count > 0)
            {
                sortHtml.Append("<ul class='tab-all'>");

                int int_i = 0;
                foreach (DataRow item in dt.Rows)
                {
                    int_i++;
                    strHtml.Append("<div id='content" + int_i + "'>");
                    strHtml.Append("<h4>" + Exchange(int_i) + item["YS_DESC"] + "</h4>");
                    strHtml.Append(GetTitles(PapersID, int.Parse(item["YS_ID"].ToString())));
                    strHtml.Append("</div>");
                    //分页按钮添加
                    sortHtml.Append("<li class='tabs_left this_tab' value='" + int_i + "'>" + int_i + "</li>");
                }

                //查询该试卷有没有填空题,有的话添加
                List <Model.PapersTitleList> List_PapersTitle = new List <Model.PapersTitleList>();
                List_PapersTitle = new BLL.PapersTitleList().GetList("填空题", PapersID, false);

                int int_count = ++int_i;
                if (List_PapersTitle != null)
                {
                    strHtml.Append("<div id='content" + int_count + "'>");
                    strHtml.Append("<h4>" + Exchange(int_count) + "补充意见</h4>");
                    foreach (Model.PapersTitleList item in List_PapersTitle)
                    {
                        int_i++;

                        strHtml.Append("<div id='tit_" + item.ID + "' class='survey_one'>");
                        strHtml.Append("<p><span class='order_head'>" + item.Num + "</span>" + item.Title + "</p>");
                        strHtml.Append("<div class='survey_select'>");
                        strHtml.Append("<textarea id='txt_" + item.ID + "' placeholder='" + item.Title + "'>" + GetGapAnswer(PapersID, item.ID) + "</textarea>");
                        strHtml.Append("</div></div>");
                    }
                    strHtml.Append("</div>");
                    //分页按钮添加
                    sortHtml.Append("<li class='tabs_left this_tab' value='" + int_count + "'>" + int_count + "</li>");
                }


                sortHtml.Append("</ul>");
                sortHtml.Append("<div id='div_submitPaper' class='my_submit'>提交问卷</div>");
            }

            TitleContent.InnerHtml = strHtml.ToString();

            sortNum.InnerHtml = sortHtml.ToString();
        }