Пример #1
0
 public void ThenService返回当前的周数()
 {
     var str = _driver.FindElement(By.TagName("pre")).Text;
     var db = new DormManageMvcContext();
     var configInfoDao = new ConfigInfoDao(db);
     var dt = configInfoDao.GetStartTime();
     Assert.AreEqual(DateTimeHelper.GetDistanceOfNowReturnWeek(dt).ToString(CultureInfo.InvariantCulture), str);
 }
Пример #2
0
 public DateTime GetStartTime()
 {
     var configInfoDao = new ConfigInfoDao(Db);
     return configInfoDao.GetStartTime();
 }
Пример #3
0
 public ActionResult GetWeek()
 {
     var configInfoDao = new ConfigInfoDao(Db);
     var week = DateTimeHelper.GetDistanceOfNowReturnWeek(configInfoDao.GetStartTime());
     var list = new List<String> { "全部" };
     for (var i = week; i > 0; i--)
     {
         list.Add(i.ToString());
     }
     return Content(Helper.ArrayToJson(list));
 }