Reviewing Project Files (2)

Take a deeper look at Index function in controller class.

  1. In line 23, it shows a variable initialization to call getEntries() function in entriesRepository class.
  2. In line 26, it being used to count the duration of the activities only when the Exclude parameter set to false.
  3. In line 31, it counts user's active days from the entries that will be used to calculate the average working days.
  4. In line 36, it stores the totalActivity value to ViewBag.TotalActivity that could be passed from controller to view.

Now, Index.cshtml.

  1. In line 7, there is a div tag like usual that holds averagedailyactivity and totalactivity from controller class.
  2. The other lines tell about html markup tags to create a view in our webpage.
  3. Notice the Action function when the button being pressed.

results matching ""

    No results matching ""