frmDbMgLog.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.IO;
  6. using System.Diagnostics;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.Text;
  10. using System.Windows.Forms;
  11. using CoreFS.CA06;
  12. using Infragistics.Win.UltraWinMaskedEdit;
  13. using Infragistics.Win.UltraWinGrid;
  14. using Infragistics.Win;
  15. using Core.StlMes.Client.LgCommon;
  16. namespace Core.StlMes.Client.LgIntegrationQuery
  17. {
  18. public partial class frmDbMgLog : frmStyleBase
  19. {
  20. public frmDbMgLog()
  21. {
  22. InitializeComponent();
  23. }
  24. private void frmSystemLog_Load(object sender, EventArgs e)
  25. {
  26. }
  27. private void button1_Click(object sender, EventArgs e)
  28. {
  29. if (listBox1.SelectedItem == null || listBox1.SelectedItem.ToString().Trim() == "")
  30. {
  31. return;
  32. }
  33. string[] strR =new string[5];
  34. string Activenum = "";
  35. string MaxActive = "";
  36. string MaxIdle = "";
  37. string MinIdel = "";
  38. string IdleNum = "";
  39. this.ob.MainUrl = listBox1.SelectedItem.ToString(); // CoreCommon.coreCommon.UrlList[]; 平台方法
  40. CoreClientParam ccp = new CoreClientParam();
  41. ccp.ServerName = "CoreFS.Util.CoreDBUtil";
  42. ccp.MethodName = "GetConnectionStatu";
  43. ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  44. strR =ccp.ReturnObject.ToString().Split(',');
  45. Activenum = strR[0].ToString();
  46. MaxActive = strR[1].ToString();
  47. MaxIdle = strR[2].ToString();
  48. MinIdel = strR[3].ToString();
  49. IdleNum = strR[4].ToString();
  50. textBox1.Text = "连接池中激活的连接数为:" + Activenum + ",允许最大并发数:" + MaxActive + ",最大等待数: " + MaxIdle + ",最小等待数:" + MinIdel + ",空闲连接数:" + IdleNum;
  51. // log.info("\n连接池中激活的连接数为:" + Activenum + "\n允许最大并发数:" + MaxActive + "\n 最大等待数: " + MaxIdle + "\n最小等待数:" + MinIdel + "\n空闲连接数:" + IdleNum + "\n");
  52. }
  53. private void bltclear_Click(object sender, EventArgs e)
  54. {
  55. textBox1.Text = "";
  56. }
  57. }
  58. }