Пример #1
0
        protected void GetUserRequests()
        {
            DataTable dt        = null;
            DateTime  dtCurDate = System.DateTime.Today.AddDays(1);


            dt = DataProxy.GetAllUserRequestInfo();

            DataView dv = dt.DefaultView;

            if (dv != null)
            {
                dv.Sort      = "Approved ASC";
                dv.RowFilter = "CreateDate >= '" + dtCurDate.AddMonths(-3).ToShortDateString() + "' AND CreateDate <= '" + dtCurDate.ToShortDateString() + "'";
            }

            grdApproveUser.DataSource = dt;
            grdApproveUser.DataBind();
            grdApproveUser.Visible    = true;
            Session["dvUserRequests"] = dt.DefaultView;
        }