コード例 #1
0
ファイル: HomeController.cs プロジェクト: evenkiel/qbooks
 private List<TimeActivityViewModel> GetTimeActivitiesBetween(DateTime startdate, DateTime enddate)
 {
     // TODO #3 Gather all activities between the start and end dates and create
     // TODO    a new instance of TimeActivityViewModel for each
     List<TimeActivityViewModel> models = new List<TimeActivityViewModel>();
     var sample = new TimeActivityViewModel
         {
             ActivityDate = DateTime.Today,
             ClientName = "The Client Name",
             ServiceName = "Which Service",
             Description = "Here's a description of the work I performed",
             HoursWorked = (decimal)1.25,
             IsBillable = true,
             UserName = "******"
         };
     models.Add(sample);
     return models;
 }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: evenkiel/qbooks
 public ActionResult CreateNewTimeActivity(TimeActivityViewModel model)
 {
     // TODO #4 Given the model information, create a new Time Activity
     return RedirectToAction("Index");
 }