| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- 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 System.Collections;
- using System.Diagnostics;
- namespace Core.LZMes.Client.UIC
- {
- public partial class CUIC030140 : FrmBase
- {string sTime_1 = null;
- public string STime_1
- {
- set { sTime_1 = value; }
- }
- string eTime_1 = null;
- public string ETime_1
- {
- set { eTime_1 = value; }
- }
- string pLine_1 = null;
- public string PLine_1
- {
- set { pLine_1 = value; }
- }
- string flag_1 = null;
- public string Flag_1
- {
- set { flag_1 = value; }
- }
- public CUIC030140()
- {
- InitializeComponent();
- }
- private void DoQuery()
- {
- CoreClientParam ccp = new CoreClientParam();
- ArrayList al = new ArrayList();
- if (this.flag_1 == "待判(未判定)(t)")
- {
- this.Text = "待判(未判定)钢卷";
- al.Add("UIC010001_12.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 (flag_1 == "非计划品量(t)"||flag_1 == "1.原料类缺陷(t)" || flag_1 == "连退表面缺陷量(t)" || flag_1 == "2.酸轧类(t)" || flag_1 == "3.连退类(t)" || flag_1 == "3.1连退平整花(t)"
- // || flag_1 == "3.2连退擦划伤(t)" || flag_1 == "3.3连退辊印/压印(痕)(t)" || flag_1 == "3.4连退其它(t)")
- //{
- // if (flag_1 == "连退表面缺陷量(t)")
- // {
- // this.Text = "连退表面缺陷连退卷";
- // al.Add("UIC010001_13.SELECT");
- // }
- // else if (flag_1 == "非计划品量(t)")
- // {
- // this.Text = "非计划原因明细";
- // al.Add("UIC010001_14.SELECT");
- // }
- // else if (flag_1 == "2.酸轧类(t)")
- // {
- // this.Text = "2.酸轧类缺陷连退卷";
- // al.Add("UIC010001_15.SELECT");
- // }
- // else if (flag_1 == "3.连退类(t)")
- // {
- // this.Text = "3.连退类缺陷连退卷";
- // al.Add("UIC010001_16.SELECT");
- // }
- // else if (flag_1 == "3.1连退平整花(t)")
- // {
- // this.Text = "3.1连退平整花缺陷连退卷";
- // al.Add("UIC010001_17.SELECT");
- // }
- // else if (flag_1 == "3.2连退擦划伤(t)")
- // {
- // this.Text = "3.2连退擦划伤缺陷连退卷";
- // al.Add("UIC010001_18.SELECT");
- // }
- // else if (flag_1 == "3.3连退辊印/压印(痕)(t)")
- // {
- // this.Text = "3.3连退辊印/压印(痕)缺陷连退卷";
- // al.Add("UIC010001_19.SELECT");
- // }
- // else if (flag_1 == "3.4连退其它(t)")
- // {
- // this.Text = "3.4连退其它缺陷连退卷";
- // al.Add("UIC010001_20.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 (flag_1 == "重卷非计划总量(t)" || flag_1 == "重卷一次命中率(%)")
- //{
- // if (flag_1 == "重卷非计划总量(t)")
- // {
- // this.Text = "非计划重卷";
- // al.Add("UIC010001_21.SELECT");
- // }
- // else if (flag_1 == "重卷一次命中率(%)")
- // {
- // this.Text = "一次命中率重卷";
- // al.Add("UIC010001_22.SELECT");
- // }
- // al.Add(sTime_1);
- // 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 if (flag_1 == "非计划品量(t)")
- {
-
- this.Text = "非计划原因明细";
- al.Add("UIC010001_23.SELECT");
- al.Add(sTime_1);
- al.Add(eTime_1);
- dataSet1.Tables[3].Clear();
- ccp.ServerName = "UIB.COM.ComDBQuery";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { al };
- ccp.SourceDataTable = this.dataSet1.Tables[3];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- return;
- }
- }
- //public CUIC030140()
- //{
- // InitializeComponent();
- //}
- private void CUIC030140_Load(object sender, EventArgs e)
- {
- this.ultraDateTimeEditor1.Value = DateTime.ParseExact(sTime_1, "yyyyMMdd", null);
- this.ultraDateTimeEditor2.Value = DateTime.ParseExact(eTime_1, "yyyyMMdd", null);
- if (this.flag_1 == "待判(未判定)(t)")
- {
- ultraGrid1.Dock = DockStyle.Fill;
- ultraGrid2.Visible = false;
- ultraGrid3.Visible = false;
- }
- else if (this.flag_1 == "非计划品量(t)")
- {
- ultraGrid2.Visible = false;
- ultraGrid3.Visible = false;
- ultraGrid1.Visible = false;
- ultraGrid4.Dock = DockStyle.Fill;
- }
- else if (flag_1 == "1.原料类缺陷(t)" || flag_1 == "重卷表面缺陷量(t)" || flag_1 == "2.酸轧类(t)" || flag_1 == "3.重卷类(t)" || flag_1 == "3.1重卷平整花(t)"
- || flag_1 == "3.2重卷擦划伤(t)" || flag_1 == "3.3重卷辊印/压印(痕)(t)" || flag_1 == "3.4重卷其它(t)")
- {
- ultraGrid1.Visible = false;
- ultraGrid3.Visible = false;
- ultraGrid2.Dock = DockStyle.Fill;
- }
- else if (flag_1 == "重卷非计划总量(t)" || flag_1 == "重卷一次命中率(%)")
- {
- ultraGrid1.Visible = false;
- ultraGrid2.Visible = false;
- ultraGrid3.Dock = DockStyle.Fill;
- if (flag_1 == "重卷非计划总量(t)")
- {
- ultraGrid3.Rows.Band.Columns["FYCMZ_YY"].Hidden = true;
- ultraGrid3.Rows.Band.Columns["JT_YCBMZYY"].Hidden = true;
- }
- else if (flag_1 == "重卷一次命中率(%)")
- {
- ultraGrid3.Rows.Band.Columns["FYCMZ_YY"].Hidden = true;
- ultraGrid3.Rows.Band.Columns["JT_YCBMZYY"].Hidden = true;
- ultraGrid3.Rows.Band.Columns["YN_FJH"].Hidden = true;
- ultraGrid3.Rows.Band.Columns["FJHYY"].Hidden = true;
- ultraGrid3.Rows.Band.Columns["JT_FJHYY"].Hidden = true;
- ultraGrid3.Rows.Band.Columns["JHN_WEIGHT"].Hidden = true;
- ultraGrid3.Rows.Band.Columns["LGYYFJH_WEIGHT"].Hidden = true;
- ultraGrid3.Rows.Band.Columns["RZYYFJH_WEIGHT"].Hidden = true;
- ultraGrid3.Rows.Band.Columns["SZYYFJH_WEIGHT"].Hidden = true;
- }
- }
- this.DoQuery();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- //private void DoExport()
- //{
- try
- {
- if (this.ultraGrid4.Rows.Count == 0)
- {
- MessageBox.Show("没有可以导出的数据", "提示");
- return;
- }
- //if(this.)
- if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- string fName = this.saveFileDialog1.FileName;
- this.ultraGridExcelExporter1.Export(this.ultraGrid4, fName);
- Process.Start(fName);
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- //}
- }
- }
- }
|