| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- using System.Collections;
- using System.Diagnostics;
- namespace Core.LZMes.Client.UIC
- {
- public partial class CUIC030110 : FrmBase
- {
- string sTime_1 = null;
- string eTime_1 = null;
- string pLine_1 = null;
- string flag_1 = null;
-
- public string pLine
- {
- set
- {
- pLine_1 = value;
- }
- }
- public string flag
- {
- set
- {
- flag_1 = value;
- }
- }
- public string sTime
- {
- set
- {
- sTime_1 = value;
- }
- }
- public string eTime
- {
- set
- {
- eTime_1 = value;
- }
- }
- public void DoQuery()
- {
- try
- {
- CoreClientParam ccp = new CoreClientParam();
- ArrayList al = new ArrayList();
- if (pLine_1 == "酸轧")
- {
- if (this.flag_1 == "酸轧非计划总量(t)" || flag_1 == "酸轧卷一次命中率(%)")
- {
- if (this.flag_1 == "酸轧非计划总量(t)")
- {
- this.Text = "非计划酸轧卷";
- al.Add("UIC010001_02.SELECT");
- }
- else if (this.flag_1 == "酸轧卷一次命中率(%)")
- {
- this.Text = "一次命中酸轧卷";
- al.Add("UIC010001_03.SELECT");
- }
- al.Add(sTime_1);
- al.Add(eTime_1);
- dataSet1.Tables[0].Clear();
- ccp.ServerName = "UIB.COM.ComDBQuery";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { al };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- return;
- }
- else if (this.flag_1 == "待判(未判定)(t)")
- {
- this.Text = "待判(未判定)酸轧卷";
- al.Add("UIC010001_04.SELECT");
- al.Add(sTime_1);
- al.Add(eTime_1);
- dataSet1.Tables[1].Clear();
- ccp.ServerName = "UIB.COM.ComDBQuery";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { al };
- ccp.SourceDataTable = this.dataSet1.Tables[1];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- return;
- }
- else if (this.flag_1 == "酸轧表面缺陷量(t)" || this.flag_1 == "1.原料类(t)"
- || this.flag_1 == "2.酸轧类(t)" || this.flag_1 == "3.钢质类(t)" || this.flag_1 == "2.1酸轧辊印(t)" || this.flag_1 == "2.2酸轧擦划伤(t)"
- || this.flag_1 == "2.3酸轧振动纹(t)" || this.flag_1 == "2.4酸轧其它(t)")
- {
- if (this.flag_1 == "酸轧表面缺陷量(t)")
- {
- al.Add("UIC010001_05.SELECT");
- this.Text = "酸轧表面缺陷量";
- }
- //啊实打实大大声道
- else if (this.flag_1 == "1.原料类(t)")
- {
- al.Add("UIC010001_06.SELECT");
- this.Text = "1.原料类非计划量";
- }
- else if (this.flag_1 == "3.钢质类(t)")
- {
- al.Add("UIC010001_10.SELECT");
- this.Text = "3.钢质类非计划量";
-
- }
- else if (this.flag_1 == "2.酸轧类(t)")
- {
- al.Add("UIC010001_07.SELECT");
- this.Text = "2.酸轧类非计划量";
- }
- else if (this.flag_1 == "2.1酸轧缺陷类(t)")
- {
- al.Add("UIC010001_08.SELECT");
- this.Text = "2.1酸轧缺陷类";
- }
- else if (this.flag_1 == "2.2酸轧类缺外(t)")
- {
- al.Add("UIC010001_09.SELECT");
- this.Text = "2.2酸轧缺陷外";
- }
- else if (this.flag_1 == "2.3酸轧振动纹(t)")
- {
- al.Add("UIC010001_10.SELECT");
- this.Text = "2.3酸轧振动纹量";
- }
- else if (this.flag_1 == "2.4酸轧其它(t)")
- {
- al.Add("UIC010001_11.SELECT");
- this.Text = "2.4酸轧其它量";
- }
- al.Add(sTime_1.Substring(0, 6) + "01");
- al.Add(eTime_1);
- dataSet1.Tables[2].Clear();
- ccp.ServerName = "UIB.COM.ComDBQuery";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { al };
- ccp.SourceDataTable = this.dataSet1.Tables[2];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- return;
- }
-
- }
- else
- {
- return;
- }
- }
- catch (Exception ex)
- {
- }
- }
- public CUIC030110()
- {
- InitializeComponent();
- }
-
- private void CUIC030110_Load(object sender, EventArgs e)
- {
- try
- {
-
- if (this.pLine_1 == "酸轧")
- {
- //酸轧
- #region
- if (this.flag_1 == "酸轧非计划总量(t)" || flag_1 == "酸轧卷一次命中率(%)")
- {
- ultraGrid2.Visible = false;
- ultraGrid3.Visible = false;
- ultraGrid1.Dock = DockStyle.Fill;
- if (this.flag_1 == "酸轧非计划总量(t)")
- {
- ultraGrid1.Rows.Band.Columns["YN_YCMZ"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["FYCMZ_YY"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["JT_YCBMZYY"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["YN_FJH"].Hidden = false;
- ultraGrid1.Rows.Band.Columns["FJHYY"].Hidden = false;
- ultraGrid1.Rows.Band.Columns["JT_FJHYY"].Hidden = false;
- ultraGrid1.Rows.Band.Columns["JHN_WEIGHT"].Hidden = false;
- ultraGrid1.Rows.Band.Columns["LGYYFJH_WEIGHT"].Hidden = false;
- ultraGrid1.Rows.Band.Columns["RZYYFJH_WEIGHT"].Hidden = false;
- ultraGrid1.Rows.Band.Columns["SZYYFJH_WEIGHT"].Hidden = false;
- }
- else if (this.flag_1 == "酸轧卷一次命中率(%)")
- {
- ultraGrid1.Rows.Band.Columns["YN_YCMZ"].Hidden = false;
- ultraGrid1.Rows.Band.Columns["FYCMZ_YY"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["JT_YCBMZYY"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["YN_FJH"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["FJHYY"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["JT_FJHYY"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["JHN_WEIGHT"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["LGYYFJH_WEIGHT"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["RZYYFJH_WEIGHT"].Hidden = true;
- ultraGrid1.Rows.Band.Columns["SZYYFJH_WEIGHT"].Hidden = true;
- }
- }
- else if (this.flag_1 == "待判(未判定)(t)")
- {
- ultraGrid1.Visible = false;
- ultraGrid3.Visible = false;
- ultraGrid2.Dock = DockStyle.Fill;
- }
- else if (this.flag_1 == "酸轧表面缺陷量(t)" || this.flag_1 == "酸轧表面缺陷量(t)" || this.flag_1 == "1.原料类(t)"
- || this.flag_1 == "2.酸轧类(t)" || this.flag_1 == "3.钢质类(t)" || this.flag_1 == "2.1酸轧辊印(t)" || this.flag_1 == "2.2酸轧擦划伤(t)"
- || this.flag_1 == "2.3酸轧振动纹(t)" || this.flag_1 == "2.4酸轧其它(t)")
- {
- ultraGrid1.Visible = false;
- ultraGrid2.Visible = false;
- ultraGrid3.Dock = DockStyle.Fill;
- }
- else
- {
- this.Close();
- }
- #endregion
- }
- else if (this.pLine_1 == "连退")
- {
- //连退
- #region
- #endregion
- }
- this.ultraDateTimeEditor1.Value = DateTime.ParseExact(sTime_1,"yyyyMMdd",null);
- this.ultraDateTimeEditor2.Value = DateTime.ParseExact(eTime_1, "yyyyMMdd", null);
- DoQuery();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message,"错误");
- }
- }
- private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
- {
- }
- private void DoExport()
- {
- try
- {
- UltraGrid ultra = null;
- if (ultraGrid1.Visible == true)
- ultra = ultraGrid1;
- else if (ultraGrid2.Visible == true)
- ultra = ultraGrid2;
- else
- ultra = ultraGrid3;
- if (ultra == null || ultra.Rows.Count == 0)
- {
- MessageBox.Show("没有可以导出的数据", "提示");
- return;
- }
- saveFileDialog1.FileName = this.Text ;
- saveFileDialog1.Filter = "表格(*.xls)|*.xls";
- if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- string fName = this.saveFileDialog1.FileName;
- this.ultraGridExcelExporter1.Export(ultra, fName);
- Process.Start(fName);
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message,"错误");
- return;
- }
- }
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "btnExport":
- DoExport();
- break;
- default:
- break;
- }
- }
- }
- }
|