Exemplo n.º 1
0
        void GetQueryString()
        {
            intSubjectId = Basic.RequestHelper.GetQueryInt("subjectid", 0);
            intTypeId    = Basic.RequestHelper.GetQueryInt("zsdid", 0);
            strZuBie     = Basic.RequestHelper.GetQueryString("zubie");

            Entity.zhishidian info = DAL.zhishidian.zhishidianEntityGet(intTypeId);
            if (info == null)
            {
                ClientScript.RegisterStartupScript(GetType(), "", "<script>artDialog11('不合法的访问');</script>");
                return;
            }
            else
            {
                strTypeName = info.name;
            }
            Entity.edu_subject infosubject = DAL.edu_subject.edu_subjectEntityGet(intSubjectId);
            if (infosubject != null)
            {
                strSubjectName = infosubject.name;
            }
            else
            {
                ClientScript.RegisterStartupScript(GetType(), "", "<script>artDialog11('不合法的访问');</script>");
                return;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        void Bind()
        {
            intZhiShiDianId = Basic.RequestHelper.GetQueryInt("id", 0);

            Entity.zhishidian infoZhiShiDian = DAL.zhishidian.zhishidianEntityGet(intZhiShiDianId);
            if (infoZhiShiDian == null)
            {
                Basic.MsgHelper.AlertBackMsg("不合法的访问");
            }
            else
            {
                strZhiShiDianName = infoZhiShiDian.name;

                //每页显示数量
                int intPageSize = 10;

                //总条数
                int intDataNumberAll = DAL.TengXB.ZhiShiDian.JiChuGongGuCount(DAL.Common.GetGaoKaoZhenTiTableName(infoZhiShiDian.subject_id), intZhiShiDianId);
                //总页数
                int intPageAll = Basic.PageNumber.GetPageAll(intDataNumberAll, intPageSize);
                //页码
                int intPageIndex = Basic.RequestHelper.GetQueryInt("p", 1);
                intPageIndex = Basic.PageNumber.GetCurrentPageNumber(intPageIndex, intPageAll);



                DataTable dtList = DAL.TengXB.ZhiShiDian.JiChuGongGuList(DAL.Common.GetGaoKaoZhenTiTableName(infoZhiShiDian.subject_id), intZhiShiDianId, intPageSize, intPageIndex);
                rpt_List.DataSource = dtList;
                rpt_List.DataBind();

                //分页
                strHtml = Basic.PageNumber.CreatPageNumber(intDataNumberAll, intPageSize, intPageIndex, 3, "JiChuGongGu.aspx?id=" + intZhiShiDianId + "&p=");
            }
        }
Exemplo n.º 3
0
        public static Entity.zhishidian zhishidianEntityGet(int Id)
        {
            Entity.zhishidian info = new Entity.zhishidian();
            DataTable         dt   = SqlDB.ExecuteDataset(strCon, CommandType.Text, "SELECT * FROM [zhishidian] WHERE Id = " + Id + ";").Tables[0];

            if (dt.Rows.Count > 0)
            {
                info.Id         = Basic.Utils.StrToInt(dt.Rows[0]["Id"].ToString(), 0);
                info.name       = dt.Rows[0]["name"].ToString();
                info.subject_id = Basic.Utils.StrToInt(dt.Rows[0]["subject_id"].ToString(), 0);
                return(info);
            }
            return(null);
        }
Exemplo n.º 4
0
        void GetQueryString()
        {
            intSubjectId = Basic.RequestHelper.GetQueryInt("subjectid", 0);
            intZsdId     = Basic.RequestHelper.GetQueryInt("zsdid", 0);

            switch (intSubjectId)
            {
            case 1:
                intTypeId = 56;
                break;

            case 2:
                intTypeId = 27;
                break;

            case 3:
                intTypeId = 63;    //英语的选择题 没有题目,所以用到的是 单项填空(其实也是选择题)
                break;

            case 4:
                intTypeId = 42;
                break;

            case 5:
                intTypeId = 2;
                break;

            case 6:
                intTypeId = 22;
                break;

            case 7:
                intTypeId = 8;
                break;

            case 8:
                intTypeId = 15;
                break;

            case 9:
                intTypeId = 93;
                break;

            default:

                ClientScript.RegisterStartupScript(GetType(), "", "<script>artDialog11('不合法的访问','','','1','index.aspx');</script>");

                return;

                break;
            }


            Entity.zhishidian info = DAL.zhishidian.zhishidianEntityGet(intZsdId);
            if (info != null)
            {
                strTypeName = info.name;
            }
            else
            {
                ClientScript.RegisterStartupScript(GetType(), "", "<script>artDialog11('不合法的访问');</script>");
                return;
            }
            Entity.edu_subject infosubject = DAL.edu_subject.edu_subjectEntityGet(intSubjectId);
            if (infosubject != null)
            {
                strSubjectName = infosubject.name;
            }
            else
            {
                ClientScript.RegisterStartupScript(GetType(), "", "<script>artDialog11('不合法的访问');</script>");
                return;
            }
        }