private void BindData() { DataTable dt = new DataTable(); if (!string.IsNullOrEmpty(ddl_Server.SelectedValue)) { pnl_chart.Visible = true; cloud.get_ServerStatus(ServerNum.ToString()); dt = cloud.dsReturn.Tables[0]; gv_Info.DataSource = dt; gv_Info.DataBind(); string strPCID = System.Text.RegularExpressions.Regex.Split(strParameter, "#c#")[0]; string strInstanceName = System.Text.RegularExpressions.Regex.Split(strParameter, "#c#")[1]; //if (strInstanceName.ToLower() == "allinstance") // strInstanceName = ""; //각 차트에서 참조해서 사용할 공통 데이터 테이블 생성 cloud.R_Adhoc("select TimeIn_UTC, Data_JSON from tbPerfmonValues_JSON where TimeIn_UTC >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and TimeIn_UTC < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + "' and ServerNum = " + ServerNum); //신규추가 2017-09-23 if (cloud.dsReturn.Tables[0].Rows.Count > 0) { //데이터 테이블 구조생성용으로 첫번째 json데이터를 불러와서 컬럼명을 자동셋팅하도록 DataTable tester = (DataTable)JsonConvert.DeserializeObject(((string)cloud.dsReturn.Tables[0].Rows[0]["Data_Json"]), (typeof(DataTable))); //tester 에는 실제로 데이터가 들어가잇고 clone 을 이용해 dt_Struct 에 데이터테이블 구조만 복사 //DataTable dt_struct = new DataTable(); dt_PerfmonValue = tester.Clone(); dt_PerfmonValue.AcceptChanges(); // 이후 dt_struct 에 계속 merge (union) 하여 하나로 합체 테스트로 돌려보니 rowcount 8만 정도 나왓네요 foreach (DataRow dr in cloud.dsReturn.Tables[0].Rows) { DataTable dt_tmp = (DataTable)JsonConvert.DeserializeObject(((string)dr["Data_Json"]), (typeof(DataTable))); //신규추가 2017-09-23 데이터 머지 = mssql union //신규추가 2017-09-23 참조 https://msdn.microsoft.com/ko-kr/library/fk68ew7b(v=vs.110).aspx dt_PerfmonValue.Merge(dt_tmp); } } //특정 카운터 데이터 테이블 만들기 if (strInstanceName.ToLower() == "allinstance") { var test = from r in dt_PerfmonValue.AsEnumerable() where r.Field <string>("PCID") == strPCID.ToString() select r; dt_PerfmonValue_select = dt_PerfmonValue.Clone(); foreach (DataRow r in test) { var newRow = dt_PerfmonValue_select.NewRow(); newRow.ItemArray = r.ItemArray; dt_PerfmonValue_select.Rows.Add(newRow);//I'm doubtful if you need to call this or not } } else { var test = from r in dt_PerfmonValue.AsEnumerable() where r.Field <string>("PCID") == strPCID && r.Field <string>("InstanceName") == strInstanceName select r; dt_PerfmonValue_select = dt_PerfmonValue.Clone(); foreach (DataRow r in test) { var newRow = dt_PerfmonValue_select.NewRow(); newRow.ItemArray = r.ItemArray; dt_PerfmonValue_select.Rows.Add(newRow);//I'm doubtful if you need to call this or not } } ////cloud.R_Windows_Perfmon(ServerNum, dtmStart, dtmEnd, strPCID, strInstanceName); //if (strInstanceName.ToLower() == "allinstance") // cloud.R_Adhoc("select TImeIn,InstanceName,PValue from tbPerfmonValues where TimeIn_UTC >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and TimeIn_UTC < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + "' and ServerNum = " + ServerNum + " and PCID = '" + strPCID + "'"); //else // cloud.R_Adhoc("select TImeIn,InstanceName,PValue from tbPerfmonValues where TimeIn_UTC >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and TimeIn_UTC < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + "' and ServerNum = " + ServerNum + " and PCID = '" + strPCID + "' and InstanceName = '" + strInstanceName + "'"); dt = Func_SetColumn(dt_PerfmonValue_select); strColumnNames = Lib.ConvertingProc.GetColumname(dt.Columns); gv_List.DataSource = dt; gv_List.DataBind(); //챠트바인드 List <Lib.chartProperty> cplst = new List <Lib.chartProperty>(); StringBuilder sb = new StringBuilder(); cplst = SetChartProperty(); cplst = Lib.Flotr2.SetArrayString_Lines(dt, cplst); sb = Lib.Flotr2.SetStringValue(cplst, sb, ServerNum.ToString()); litScript.Text += Lib.Util.BoxingScript(sb.ToString()); } }
private void BindData() { DataTable dt = new DataTable(); if (!string.IsNullOrEmpty(ddl_Server.SelectedValue)) { cloud.get_ServerStatus(ServerNum.ToString()); dt = cloud.dsReturn.Tables[0]; gv_Info.DataSource = dt; gv_Info.DataBind(); } //cloud.R_WEB_Report(Lib.Util.TConverter<int>(ddl_Server.SelectedValue), dtmStart, dtmEnd); //Adhoc으로 던져봄 (tbDashboard 데이터 가져오기) cloud.R_Adhoc("select TimeIn,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 from tbDashboard where Timein_UTC >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and Timein_UTC < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + " ' and ServerNum = " + ServerNum); //dt = new DataTable(); dt_Data = Lib.ConvertingProc.ChangeDashboardColumnName(cloud.dsReturn.Tables[0]); dt_Data = Lib.ConvertingProc.SetDashboardDtServer(dt_Data); dt_Data = func_MatchColumName(dt_Data); //각 차트에서 참조해서 사용할 공통 데이터 테이블 생성 cloud.R_Adhoc("select TimeIn_UTC, Data_JSON from tbPerfmonValues_JSON where Timein_UTC >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and Timein_UTC < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + "' and ServerNum = " + ServerNum); //신규추가 2017-09-23 if (cloud.dsReturn.Tables[0].Rows.Count > 0) { //데이터 테이블 구조생성용으로 첫번째 json데이터를 불러와서 컬럼명을 자동셋팅하도록 DataTable tester = (DataTable)JsonConvert.DeserializeObject(((string)cloud.dsReturn.Tables[0].Rows[0]["Data_Json"]), (typeof(DataTable))); //tester 에는 실제로 데이터가 들어가잇고 clone 을 이용해 dt_Struct 에 데이터테이블 구조만 복사 //DataTable dt_struct = new DataTable(); dt_PerfmonValue = tester.Clone(); dt_PerfmonValue.AcceptChanges(); // 이후 dt_struct 에 계속 merge (union) 하여 하나로 합체 테스트로 돌려보니 rowcount 8만 정도 나왓네요 foreach (DataRow dr in cloud.dsReturn.Tables[0].Rows) { DataTable dt_tmp = (DataTable)JsonConvert.DeserializeObject(((string)dr["Data_Json"]), (typeof(DataTable))); //신규추가 2017-09-23 데이터 머지 = mssql union //신규추가 2017-09-23 참조 https://msdn.microsoft.com/ko-kr/library/fk68ew7b(v=vs.110).aspx dt_PerfmonValue.Merge(dt_tmp); } } { //dt_FreeDisk 데이터 테이블 만들기 var test = from r in dt_PerfmonValue.AsEnumerable() where r.Field <string>("PCID") == "P018" && !r.Field <string>("InstanceName").Contains("_Total") && !r.Field <string>("InstanceName").Contains("HarddiskVolume") select r; dt_FreeDisk = dt_PerfmonValue.Clone(); foreach (DataRow r in test) { var newRow = dt_FreeDisk.NewRow(); newRow.ItemArray = r.ItemArray; dt_FreeDisk.Rows.Add(newRow);//I'm doubtful if you need to call this or not } dt_FreeDisk = Lib.ConvertingProc.SetDiskProc(dt_FreeDisk); //dt_FreeDisk = Lib.ConvertingProc.Pivot(dt_FreeDisk, "Instancename", "TimeIn", "PValue"); //strFreeDiskColumName = Lib.ConvertingProc.GetColumname(dt_FreeDisk.Columns); } { //dt_FreeDiskPercent 데이터 테이블 만들기 var test = from r in dt_PerfmonValue.AsEnumerable() where r.Field <string>("PCID") == "P018" && !r.Field <string>("InstanceName").Contains("_Total") && !r.Field <string>("InstanceName").Contains("HarddiskVolume") select r; dt_FreeDiskPercent = dt_PerfmonValue.Clone(); foreach (DataRow r in test) { var newRow = dt_FreeDiskPercent.NewRow(); newRow.ItemArray = r.ItemArray; dt_FreeDiskPercent.Rows.Add(newRow);//I'm doubtful if you need to call this or not } dt_FreeDiskPercent = Lib.ConvertingProc.SetDiskProc(dt_FreeDiskPercent); } List <Lib.chartProperty> cplst = new List <Lib.chartProperty>(); StringBuilder sb = new StringBuilder(); cplst = SetChartProperty(); cplst = Lib.Flotr2.SetArrayString_Line_DualYAxis(dt_Data, cplst); //cplst = Lib.Flotr2.SetArrayString_Pie(dt_FreeDisk_Max, cplst); cplst = Lib.Flotr2.SetArrayString_Lines(dt_FreeDisk, cplst); cplst = Lib.Flotr2.SetArrayString_Lines(dt_Data, cplst); cplst = Lib.Flotr2.SetArrayString_Bar(dt_FreeDiskPercent, cplst); sb = Lib.Flotr2.SetStringValue(cplst, sb, ServerNum.ToString()); litScript.Text += Lib.Util.BoxingScript(sb.ToString()); }
private void BindData() { DataTable dt = new DataTable(); if (!string.IsNullOrEmpty(ddl_Server.SelectedValue)) { cloud.get_ServerStatus(ServerNum.ToString()); dt = cloud.dsReturn.Tables[0]; gv_Info.DataSource = dt; gv_Info.DataBind(); } //cloud.R_WEB_TimeTaken(Lib.Util.TConverter<int>(ddl_Server.SelectedValue), dtmStart, dtmEnd); cloud.R_Adhoc("SELECT TOP(20) URI,AVG(AvgTimeTaken) AS [Average Time Taken], MAX(MaxTimeTaken) AS [Max Time Taken] FROM tbIISLog WHERE TimeIn_UTC >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and Timein_UTC < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + " ' and ServerNum = " + ServerNum + " GROUP BY URI ORDER BY [Average Time Taken] DESC"); DataTable dt_Web_TimeTaken = cloud.dsReturn.Tables[0]; gv_List_AvgTimeTaken.DataSource = dt_Web_TimeTaken; gv_List_MaxTimeTaken.DataSource = dt_Web_TimeTaken; gv_List_AvgTimeTaken.DataBind(); gv_List_MaxTimeTaken.DataBind(); //cloud.R_WEB_Byte(Lib.Util.TConverter<int>(ddl_Server.SelectedValue), dtmStart, dtmEnd); cloud.R_Adhoc("SELECT TOP(20) URI,SUM(CAST(SCBytes AS float)) AS [Total Bytes from Server], SUM(Hits) AS [Total Hits] FROM tbIISLog WHERE TimeIn_UTC >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and TimeIn_UTC < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + " ' and ServerNum = " + ServerNum + " GROUP BY URI ORDER BY [Total Bytes from Server] DESC"); DataTable dt_Web_Byte = cloud.dsReturn.Tables[0]; gv_List_TotalBytes.DataSource = dt_Web_Byte; gv_List_TotalHit.DataSource = dt_Web_Byte; gv_List_TotalBytes.DataBind(); gv_List_TotalHit.DataBind(); //cloud.R_WEB_RequestStatus(Lib.Util.TConverter<int>(ddl_Server.SelectedValue), dtmStart, dtmEnd); cloud.R_Adhoc("SELECT ValueDescription,LogValue,SUM(TotalNumber) AS [Total] FROM tbIISRequestStatus WHERE TimeIn_UTC >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and TimeIn_UTC < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + " ' and ServerNum = " + ServerNum + " GROUP BY ValueDescription, LogValue ORDER BY ValueDescription, Total DESC"); DataTable dt_Web_Request = cloud.dsReturn.Tables[0]; DataTable dt_Web_Request_hit = new DataTable(); var query = from data in dt_Web_Request.AsEnumerable() where data["ValueDescription"].ToString() == "TOP 20 Hits" orderby data["Total"] descending select data; if (query.Count() > 0) { dt_Web_Request_hit = query.CopyToDataTable <DataRow>(); dt_Web_Request_hit.Columns["LogValue"].ColumnName = "hit"; } gv_List_Hit.DataSource = dt_Web_Request_hit; gv_List_Hit.DataBind(); DataTable dt_Web_Request_App_hit = new DataTable(); query = from data in dt_Web_Request.AsEnumerable() where data["ValueDescription"].ToString() == "TOP 20 Application Hits" orderby data["Total"] descending select data; if (query.Count() > 0) { dt_Web_Request_App_hit = query.CopyToDataTable <DataRow>(); dt_Web_Request_App_hit.Columns["LogValue"].ColumnName = "App_hit"; } gv_List_App_Hit.DataSource = dt_Web_Request_App_hit; gv_List_App_Hit.DataBind(); DataTable dt_Web_Request_IpAddr = new DataTable(); query = from data in dt_Web_Request.AsEnumerable() where data["ValueDescription"].ToString() == "TOP 20 Clients IP" orderby data["Total"] descending select data; if (query.Count() > 0) { dt_Web_Request_IpAddr = query.CopyToDataTable <DataRow>(); dt_Web_Request_IpAddr.Columns["LogValue"].ColumnName = "IP"; } gv_List_IP.DataSource = dt_Web_Request_IpAddr; gv_List_IP.DataBind(); DataTable dt_Web_Request_BytePerExtension = new DataTable(); query = from data in dt_Web_Request.AsEnumerable() where data["ValueDescription"].ToString() == "TOP 20 Bytes per Extension" orderby data["Total"] descending select data; if (query.Count() > 0) { dt_Web_Request_BytePerExtension = query.CopyToDataTable <DataRow>(); dt_Web_Request_BytePerExtension.Columns["LogValue"].ColumnName = "BytePerExtension"; } gv_List_BytePerExtenstion.DataSource = dt_Web_Request_BytePerExtension; gv_List_BytePerExtenstion.DataBind(); //cloud.R_WEB_Errors(Lib.Util.TConverter<int>(ddl_Server.SelectedValue), dtmStart, dtmEnd); cloud.R_Adhoc("SELECT TOP(20) URI, SUM(Hits) AS [Total Hits], StatusCode as [Status Code], Win32StatusCode as [Win32 Status Code] FROM tbIISLog WHERE TimeIn >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and Timein < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + " ' and ServerNum = " + ServerNum + " and StatusCode >= 400 GROUP BY URI, StatusCode, Win32StatusCode ORDER BY [Total Hits] DESC"); DataTable dt_Error = cloud.dsReturn.Tables[0]; gv_List_Err.DataSource = dt_Error; gv_List_Err.DataBind(); //cloud.R_WEB_ServiceStatus(Lib.Util.TConverter<int>(ddl_Server.SelectedValue), dtmStart, dtmEnd); cloud.R_Adhoc("SELECT SUM(TotalHits) AS [Total Hits], SUM(TotalSCBytes) AS [Total Bytes from Server], SUM(TotalCSBytes) AS [Total Bytes from Clients], SUM(TotalCIP) AS [Total Client IP], SUM(TotalErrors) AS [Total Errors] FROM tbIISServiceStatus WHERE TimeIn >= '" + dtmStart.ToString("yyyy-MM-dd HH:mm:ss") + "' and Timein < '" + dtmEnd.ToString("yyyy-MM-dd HH:mm:ss") + " ' and ServerNum = " + ServerNum); DataTable dt_ServiceStatus = cloud.dsReturn.Tables[0]; gv_List_ServiceStatus.DataSource = dt_ServiceStatus; gv_List_ServiceStatus.DataBind(); //챠트바인드 List <Lib.chartProperty> cplst = new List <Lib.chartProperty>(); StringBuilder sb = new StringBuilder(); cplst = Lib.Flotr2.SetArrayString_Cols_Horizon(dt_Web_TimeTaken, SetChartProperty()); cplst = Lib.Flotr2.SetArrayString_Cols_Horizon(dt_Web_Byte, cplst); cplst = Lib.Flotr2.SetArrayString_Cols_Horizon(dt_Web_Request_hit, cplst); cplst = Lib.Flotr2.SetArrayString_Cols_Horizon(dt_Web_Request_App_hit, cplst); cplst = Lib.Flotr2.SetArrayString_Cols_Horizon(dt_Web_Request_BytePerExtension, cplst); cplst = Lib.Flotr2.SetArrayString_Cols_Horizon(dt_Web_Request_IpAddr, cplst); //cplst = Lib.Flotr2.SetArrayString_Lines(dt, cplst); sb = Lib.Flotr2.SetStringValue(cplst, sb, ServerNum.ToString()); litScript.Text += Lib.Util.BoxingScript(sb.ToString()); }
public void BindData() { dt_Alert = new DataTable(); //서버리스트 읽어오기 string MyServerList = ""; cloud.SetCmd("Cloud"); cloud.get_MyServerList(MemberNum); foreach (DataRow dr in cloud.dsReturn.Tables[0].Rows) { MyServerList += dr["ServerNum"].ToString() + ","; } MyServerList = MyServerList.Substring(0, MyServerList.Length - 1); int nReturn = cloud.get_ServerStatus(MyServerList); if (cloud.dsReturn.Tables[0].Rows.Count > 0) { MyServerList = ""; foreach (DataRow dr in cloud.dsReturn.Tables[0].Select("ServerType = 'Web'")) { MyServerList += dr["ServerNum"].ToString() + ","; } MyServerList = MyServerList.Substring(0, MyServerList.Length - 1); } nReturn = cloud.get_Dashboard(MyServerList);; dt_w_Dashboard = Lib.ConvertingProc.w_Dashboard(cloud.dsReturn.Tables[0]); gvList.DataSource = dt_w_Dashboard; nReturn = nReturn = cloud.get_Dashboard_Chart(MyServerList); dt_w_Dashboard_chart = Lib.ConvertingProc.ChangeDashboardColumnName(cloud.dsReturn.Tables[0]); //각 차트에서 참조해서 사용할 공통 데이터 테이블 생성 nReturn = cloud.get_PerfvaluesData_Company(CompanyNum); //신규추가 2017-09-23 if (cloud.dsReturn.Tables[0].Rows.Count > 0) { //데이터 테이블 구조생성용으로 첫번째 json데이터를 불러와서 컬럼명을 자동셋팅하도록 DataTable tester = (DataTable)JsonConvert.DeserializeObject(((string)cloud.dsReturn.Tables[0].Rows[0]["Data_Json"]), (typeof(DataTable))); //tester 에는 실제로 데이터가 들어가잇고 clone 을 이용해 dt_Struct 에 데이터테이블 구조만 복사 //DataTable dt_struct = new DataTable(); dt_PerfmonValue = tester.Clone(); dt_PerfmonValue.AcceptChanges(); // 이후 dt_struct 에 계속 merge (union) 하여 하나로 합체 테스트로 돌려보니 rowcount 8만 정도 나왓네요 foreach (DataRow dr in cloud.dsReturn.Tables[0].Rows) { DataTable dt_tmp = (DataTable)JsonConvert.DeserializeObject(((string)dr["Data_Json"]), (typeof(DataTable))); //신규추가 2017-09-23 데이터 머지 = mssql union //신규추가 2017-09-23 참조 https://msdn.microsoft.com/ko-kr/library/fk68ew7b(v=vs.110).aspx dt_PerfmonValue.Merge(dt_tmp); } } //dt_FreeDisk 데이터 테이블 만들기 var test = from r in dt_PerfmonValue.AsEnumerable() where (r.Field <string>("PCID") == "P018" || r.Field <string>("PCID") == "P164" || r.Field <string>("PCID") == "P015" || r.Field <string>("PCID") == "P190" || r.Field <string>("PCID") == "P194") && !r.Field <string>("InstanceName").Contains("_Total") && !r.Field <string>("InstanceName").Contains("HarddiskVolume") select r; dt_FreeDisk = dt_PerfmonValue.Clone(); foreach (DataRow r in test) { var newRow = dt_FreeDisk.NewRow(); newRow.ItemArray = r.ItemArray; dt_FreeDisk.Rows.Add(newRow);//I'm doubtful if you need to call this or not } dt_FreeDisk = Lib.ConvertingProc.SetDiskProc_All(dt_FreeDisk); gvList.DataBind(); //Alert Message 로딩 //nReturn = cloud.get_AlertMessage(MyServerList, numAlertDataDuration); //if (cloud.dsReturn.Tables[0].Rows.Count > 0) //{ // //데이터 테이블 구조생성용으로 첫번째 json데이터를 불러와서 컬럼명을 자동셋팅하도록 // DataTable tester = (DataTable)JsonConvert.DeserializeObject(((string)cloud.dsReturn.Tables[0].Rows[0]["Data_Json"]), (typeof(DataTable))); // //tester 에는 실제로 데이터가 들어가잇고 clone 을 이용해 dt_Struct 에 데이터테이블 구조만 복사 // DataTable dt_struct = new DataTable(); // dt_Alert = tester.Clone(); // dt_Alert.Columns.Add("RepeatCnt"); // dt_Alert.AcceptChanges(); // //이후 dt_struct 에 계속 merge(union) 하여 하나로 합체 테스트로 돌려보니 rowcount 8만 정도 나왓네요 // foreach (DataRow dr in cloud.dsReturn.Tables[0].Rows) // { // DataTable dt_tmp = (DataTable)JsonConvert.DeserializeObject(((string)dr["Data_Json"]), (typeof(DataTable))); // //신규추가 2017 - 09 - 23 데이터 머지 = mssql union // //신규추가 2017 - 09 - 23 참조 https://msdn.microsoft.com/ko-kr/library/fk68ew7b(v=vs.110).aspx // dt_Alert.Merge(dt_tmp); // } //} //cloud.dsReturn.Dispose(); }
public void BindData() { DB.Cloud cloud = new DB.Cloud(); //DataTable dt_ServerAlertList = new DataTable(); //서버리스트 읽어오기 string MyServerList = ""; cloud.SetCmd("Cloud"); cloud.get_MyServerList(MemberNum); if (cloud.dsReturn.Tables[0].Rows.Count == 0) { return; } foreach (DataRow dr in cloud.dsReturn.Tables[0].Rows) { MyServerList += dr["ServerNum"].ToString() + ","; } if (MyServerList.Length > 0) { MyServerList = MyServerList.Substring(0, MyServerList.Length - 1); } cloud.SetCmd("Cloud"); int nReturn = cloud.get_ServerStatus(MyServerList); DataSet ds = cloud.dsReturn; List <string> dt_Group = new List <string>(); if (ds != null) { dt_ServerList = Lib.ConvertingProc.w_Dashboard(ds.Tables[0]); var tmp_Group = from tbl in ds.Tables[0].AsEnumerable() orderby tbl["DisplayGroup"] ascending group tbl by tbl["DisplayGroup"] into tmp select tmp; foreach (var i in tmp_Group) { dt_Group.Add(i.Key.ToString()); } tmp_Group = null; } else { return; } ds.Clear(); ds.Dispose(); rpt_ServerStatus.DataSource = dt_Group; rpt_ServerStatus.DataBind(); dt_Group.Clear(); //nReturn = cloud.W_AlertCountList(MemberNum, CompanyNum, numAlertDataDuration); //if (cloud.dsReturn != null) //{ // dt_ServerAlertList = cloud.dsReturn.Tables[0]; // var tmp_Group = from tbl in dt_ServerAlertList.AsEnumerable() // orderby tbl["DisplayGroup"] ascending // group tbl by tbl["DisplayGroup"] into tmp // select tmp; // foreach (var i in tmp_Group) // { // SetAlertDic(dt_ServerAlertList, i.Key.ToString()); // dt_Group.Add(i.Key.ToString()); // } // cloud.dsReturn.Clear(); // cloud.dsReturn.Dispose(); // tmp_Group = null; //} //else //{ // return; //} ////rpt_Alert.DataSource = dt_Group; ////rpt_Alert.DataBind(); dt_Group.Clear(); cloud.CloseCon(); }