Example #1
0
        private void gv01_Bind()
        {
            BLL.Results          bll  = new BLL.Results();
            List <Model.Results> list = new List <Model.Results>();


            if (ViewState["PageCount"] == null)
            {
                ViewState["PageCount"] = 1;
            }
            string Sort = ViewState["SortOrder"].ToString() + " " + ViewState["OrderDire"].ToString();

            if (CourseID > 0)
            {
                list = bll.GetList(CourseID);
            }
            else
            {
                //list = bll.GetList();
                list = bll.GetList(Convert.ToInt32(ViewState["PageCount"]), PageSize, Sort, tb_Search.Text.Trim(), ddl_Search.SelectedValue);
            }
            gv01.DataSource = list;
            gv01.DataBind();
            if (list.Count > 0)
            {
                Total            = list[0].RowTotal;
                labAlert.Visible = false;
            }
            else
            {
                labAlert.Visible = true;
                labAlert.Text    = "没有任何资料!";
                labAlert.Style.Add("color", "red");
            }
            PageCount();
            Page_Status();
            Auto();
        }
Example #2
0
        private void gv01_Bind1(int CourseID)
        {
            BLL.Results          bll  = new BLL.Results();
            List <Model.Results> list = new List <Model.Results>();


            if (ViewState["PageCount"] == null)
            {
                ViewState["PageCount"] = 1;
            }
            list            = bll.GetList(CourseID);
            gv01.DataSource = list;
            gv01.DataBind();
        }
Example #3
0
        private void gv01_Bind1(string Time)
        {
            BLL.Results          bll  = new BLL.Results();
            List <Model.Results> list = new List <Model.Results>();

            Time = Time[0].ToString() + Time[1].ToString() + Time[2].ToString() + Time[3].ToString() + "-" + Time[4].ToString() + Time[5].ToString() + "-" + Time[6].ToString() + Time[7].ToString();
            if (ViewState["PageCount"] == null)
            {
                ViewState["PageCount"] = 1;
            }
            list            = bll.GetList(Time);
            gv01.DataSource = list;
            gv01.DataBind();
        }