protected void Page_Load(object sender, EventArgs e) { if (this.Attributes["mode"] != null) { int mode = int.Parse(this.Attributes["mode"]); TimePeriods timePeriod = new TimePeriods(); switch (mode) { case 1: timePeriod.SetLast30Days(); break; case 2: timePeriod.SetWeekDays(); break; case 3: timePeriod.SetMonthDays(); break; case 4: timePeriod.SetYearDays(); break; } fleetIdlingTime = DashboardDataAccess.getFleetIdling(timePeriod.StartDate, timePeriod.EndDate); if (fleetIdlingTime > 20) { fleetIdlingTime = 20; } } }
public async Task RetrieveDashboardValues() { var dashboardValues = new DashboardDataAccess(); _dashboardData = await dashboardValues.RetreiveDashboardData(); Debug.WriteLine($"dashboard count= {_dashboardData.Count}"); }
public List <MentorDetail> GetPathfindersIds(int userId, int poeId, int type) { try { DashboardDataAccess dashboardda = new DashboardDataAccess(); return(dashboardda.GetPathfinderDetails(userId, poeId, type)); } catch (Exception e) { WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.PreconditionFailed; WebOperationContext.Current.OutgoingResponse.StatusDescription = e.Message; BusinessLogic.Common.Common common = new BusinessLogic.Common.Common(); common.CreateErrorLog(userId, "GetPathfindersIds", e.Message, 0); } return(null); }