Ejemplo n.º 1
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        protected void BindData()
        {
            int      _OrgId    = Convert.ToInt32(Request.QueryString["OrgID"]);
            DateTime _DateFrom = Convert.ToDateTime(Request.QueryString["beginTime"]);

            if (string.IsNullOrEmpty(_DateFrom.ToString()))
            {
                _DateFrom = Convert.ToDateTime(System.DateTime.Now.Year.ToString() + "-" + System.DateTime.Now.Month.ToString("00") + "-01");
            }
            DateTime _DateTo = Convert.ToDateTime(Request.QueryString["endTime"]);

            if (string.IsNullOrEmpty(_DateTo.ToString()))
            {
                _DateTo = Convert.ToDateTime(DateTime.Today.ToShortDateString());
            }

            int style = Convert.ToInt32(Request.QueryString.Get("style"));

            ExamBLL objBll = new ExamBLL();
            IList <RailExam.Model.Exam> objList = objBll.GetListtWithOrg(_OrgId, _DateFrom, _DateTo, style);

            examsGrid.DataSource = objList;
            examsGrid.DataBind();
        }