private void Button1_Click(object sender, EventArgs e) { RealabilityReport realability = new RealabilityReport(); DateTime from = dtPickerFrom.Value; DateTime to = dtPickerTo.Value; // realability.GetDataBackLogToExport(out listShipingResult); List <RawReliability> realabilityItems = realability.GetDataRawReliability(from, to); var temp = realabilityItems.Where(d => d.DepartmentCode == "").ToList(); Dictionary <string, Dictionary <string, List <ReliabilitySummary> > > GetdataGroupByClient = realability.SortbyClientRealitykeyValuePairs(realabilityItems); List <ReliabilitySummary> listReliabilityToShow = new List <ReliabilitySummary>(); foreach (var ClientsGroup in GetdataGroupByClient) { foreach (var DeptGroup in ClientsGroup.Value) { foreach (var item in DeptGroup.Value) { listReliabilityToShow.Add(item); } } } dataGridView1.DataSource = listReliabilityToShow; }
private void Button2_Click(object sender, EventArgs e) { RealabilityReport realability = new RealabilityReport(); DateTime from = dtPickerFrom.Value; DateTime to = dtPickerTo.Value; // realability.GetDataBackLogToExport(out listShipingResult); List <RawReliability> realabilityItems = realability.GetDataRawReliability(from, to); //Dictionary<string, Dictionary<string, List<ReliabilitySummary>>> // GetdataGroupByClient = realability.SortbyClientRealitykeyValuePairs(realabilityItems); //List<ReliabilitySummary> listReliabilityToShow = new List<ReliabilitySummary>(); //foreach (var ClientsGroup in GetdataGroupByClient) //{ // foreach (var DeptGroup in ClientsGroup.Value) // { // foreach (var item in DeptGroup.Value) // { // listReliabilityToShow.Add(item); // } // } //} dataGridView1.DataSource = realabilityItems; }