예제 #1
0
 public ActionResult HoursWorkedInPeriod(Employee employee)
 {
     if (ModelState.IsValid)
     {
         timeWorkedInGivenPeriod = homeService.CountHoursWorked(employee);
         timeToDisplay           = (timeWorkedInGivenPeriod.Days * 24 + timeWorkedInGivenPeriod.Hours) + " Hours " + timeWorkedInGivenPeriod.Minutes + " Minutus";
         Employee newEmployee = new Employee();
         newEmployee.HoursWorkedInGivenPeriod = timeToDisplay;
         ModelState.Clear();
         return(View("Index", newEmployee));
     }
     return(View("Index"));
 }