private void ClassLevelDrill() { //Get Data from SQL Stored Procs List <String> issueClass = ScoreCardReports.GetIssueClass(); List <String> iTmembers = new List <string>(); if (showIT == true) { iTmembers = ScoreCardReports.GetITMembers(); iTmembers.Remove("Unassigned"); //will always be 0 hours - no diplay } else { iTmembers.Add("ALL"); } foreach (String name in iTmembers) { double none = ScoreCardReports.GetNumberOfClasses(name, "none", Int32.Parse(ddlDrillWeek.SelectedValue), Int32.Parse(ddlDrillYear.SelectedValue)); double fault = ScoreCardReports.GetNumberOfClasses(name, "Fault/Failure", Int32.Parse(ddlDrillWeek.SelectedValue), Int32.Parse(ddlDrillYear.SelectedValue)); double service = ScoreCardReports.GetNumberOfClasses(name, "Service Request", Int32.Parse(ddlDrillWeek.SelectedValue), Int32.Parse(ddlDrillYear.SelectedValue)); double assistance = ScoreCardReports.GetNumberOfClasses(name, "Assistance/Inquiry", Int32.Parse(ddlDrillWeek.SelectedValue), Int32.Parse(ddlDrillYear.SelectedValue)); // Merge 3 arraylist data into multidimentional class array drillDownDatasource.Add(new Issues() { Unassigned = none, Fault = fault, Assistance = assistance, Service = service, label = name }); } //this change //TypePanel.DataBind(); TypePanel.TakeDataSource += WeekDrillDown_TakeDataSource; }
protected void Page_Load(object sender, EventArgs e) { /** Calculate Year **/ int _currentyear; const int _year = 2013; _currentyear = DateTime.Now.Year; int _currentMonth = DateTime.Now.Month; //only add if list is clear -- it will add new items on every graph refresh if (ddlYear.Items.Count < 1 || ddlDrillYear.Items.Count < 1) { for (int s = _currentyear; s >= _year; s--) { ddlYear.Items.Add(new ListItem((s).ToString(), (s).ToString())); ddlDrillYear.Items.Add(new ListItem((s).ToString(), (s).ToString())); ddlYr.Items.Add(new ListItem((s).ToString(), (s).ToString())); } } //ddlYear.DataBind(); /** Calculate Week **/ CultureInfo ciCurr = CultureInfo.CurrentCulture; int weekNum = ciCurr.Calendar.GetWeekOfYear(DateTime.Now.Date, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday); int mthNum = ciCurr.Calendar.GetMonthsInYear(DateTime.Now.Year); //only add if list if clear -- it will add new items on every graph refresh if (ddlWeek.Items.Count < 1 || ddlDrillWeek.Items.Count < 1) { for (int s = weekNum; s >= 1; s--) { ddlDrillWeek.Items.Add(new ListItem((s).ToString(), (s).ToString())); ddlWeek.Items.Add(new ListItem((s).ToString(), (s).ToString())); } } if (ddlMth.Items.Count < 1) { int stop = 12 - _currentMonth; for (int s = _currentMonth; s >= 1; s--) { ddlMth.Items.Add(new ListItem((s).ToString(), (s).ToString())); } for (int s = 12; s > 12 - stop; s--) { ddlMth.Items.Add(new ListItem((s).ToString(), (s).ToString())); } } if (ddlResource.Items.Count < 1) { List <String> members = new List <String>(); //get IT Members members = ScoreCardReports.GetITMembers(); members.Remove("Unassigned"); //should always be 0 hours - don't display foreach (String name in members) { ddlResource.Items.Add(name); } } if (ddlBacklogYear.Items.Count < 1) { List <int> years = new List <int>(); //get IT Members years = ScoreCardReports.GetBacklog_Year(); foreach (int name in years) { ddlBacklogYear.Items.Add(name.ToString()); } } if (ddlBacklogWeek.Items.Count < 1) { List <int> weeks = new List <int>(); //get IT Members weeks = ScoreCardReports.GetBacklog_Week(); foreach (int name in weeks) { ddlBacklogWeek.Items.Add(name.ToString()); } } CreateWeeklyChart(); Create12WeekChart(); CreateWeeklyIssuesDrillDown(); CreateMonthlyIssuesDrillDown(); CreateAgingChart(); NewWeeklyByResource(); CreateBacklog(); }