Пример #1
0
        public ActionResult RecentFiles(string method, int page)
        {
            atriumManager myAtmng = Helper.Atmng();

            appDB.EFileSearchDataTable dt;
            switch (method)
            {
            case "today":
                dt = myAtmng.FileSearchByRecentFiles(myAtmng.AppMan.myUser, atDates.StandardDate.Today.BeginDate, atDates.StandardDate.Today.EndDate);
                break;

            case "thisweek":
                dt = myAtmng.FileSearchByRecentFiles(myAtmng.AppMan.myUser, atDates.StandardDate.ThisWeek.BeginDate, atDates.StandardDate.ThisWeek.EndDate);
                break;

            case "lastweek":
                dt = myAtmng.FileSearchByRecentFiles(myAtmng.AppMan.myUser, atDates.StandardDate.LastWeek.BeginDate, atDates.StandardDate.LastWeek.EndDate);
                break;

            case "yesterday":
                dt = myAtmng.FileSearchByRecentFiles(myAtmng.AppMan.myUser, atDates.StandardDate.Yesterday.BeginDate, atDates.StandardDate.Yesterday.EndDate);
                break;

            default:
                throw new Exception("Not a valid search method");
            }

            ViewBag.Atmng   = myAtmng;
            ViewBag.keyword = "";
            ViewBag.method  = method;
            ViewBag.Action  = "RecentFiles";

            return(View("Search", dt.AsEnumerable().ToPagedList(page, 12)));
        }
Пример #2
0
        public int DoSearch(string userName, DateTime dateStart, DateTime dateEnd)
        {
            appDB.EFileSearchDataTable dt;
            dt = AtMng.FileSearchByRecentFiles(userName, dateStart, dateEnd);

            Bs.DataSource = dt;

            return(dt.Rows.Count);
        }