| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- 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 UIC010001 : FrmBase
- {
- public UIC010001()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Export":
- this.DoExport();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- private void DoQuery()
- {
- try
- {
- UIK.UIK020030 s = new UIK.UIK020030();
- //s.DoQuery1(); //实绩刷新
- s.ob = this.ob;
- s.DoQuery1();
-
- CoreClientParam ccp = null;
- if (this.checkBox1.Checked)
- {
- ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i1", this.ultraComboEditor1.Text);
- ht.Add("i2", this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd")+ "-"+this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd"));
- ht.Add("o3", "");
- ccp.ServerName = "UIB.COM.ComDBProcedure";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIC010001_01.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- }
- //查询
- this.dataSet1.Clear();
- ArrayList al = new ArrayList();
- al.Add("UIC010001_01.SELECT");
- al.Add(this.ultraComboEditor1.Text);
- al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "-" + this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") );
- ccp = new CoreClientParam();
- ccp.ServerName = "UIB.COM.ComDBQuery";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { al };
- ccp.IfShowErrMsg = false;
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void DoExport()
- {
- try
- {
- if (this.ultraGrid1.Rows.Count == 0)
- {
- MessageBox.Show("没有可以导出的数据", "提示");
- return;
- }
- if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- string fName = this.saveFileDialog1.FileName;
- this.ultraGridExcelExporter1.Export(this.ultraGrid1, fName);
- Process.Start(fName);
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void UIC010001_Load(object sender, EventArgs e)
- {
- this.ultraComboEditor1.SelectedIndex = 0;
- }
- private void ultraGrid1_DoubleClick(object sender, EventArgs e)
- {
- try
- {
- if (this.ultraGrid1.ActiveCell == null)
- return;
- //string gridValue = this.ultraGrid1.ActiveCell.Column.Key;//== "ZHIBIAO";
-
- string s1 = this.ultraComboEditor1.Text;
- string s2 = this.ultraGrid1.ActiveRow.Cells["ZHIBIAO"].Text;
- if (s1 == "酸轧")
- {
- CUIC030110 CWindow = new CUIC030110();
- CWindow.ob = this.ob;
- CWindow.pLine = this.ultraComboEditor1.Text;
- CWindow.sTime = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd");
- CWindow.eTime = this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd");
- CWindow.flag = this.ultraGrid1.ActiveRow.Cells["ZHIBIAO"].Text;
- if (s2 == "酸轧非计划总量(t)" || s2 == "酸轧卷一次命中率(%)" || s2 == "酸轧表面缺陷量(t)" || s2 == "1.原料类(t)" || s2 == "待判(未判定)(t)" || s2 == "2.酸轧类(t)" || s2 == "3.钢质类(t)" || s2 == "2.1酸轧辊印(t)" || s2 == "2.2酸轧擦划伤(t)" || s2 == "2.3酸轧振动纹(t)" || s2 == "2.4酸轧其它(t)")
- {
- CWindow.StartPosition = FormStartPosition.CenterScreen;
- if (CWindow.ShowDialog() == DialogResult.OK)
- {
- //null;
- }
- CWindow.Dispose();
- }
- }
- else if (s1 == "连退")
- {
- CUIC030130 CWindow = new CUIC030130();
- CWindow.ob = this.ob;
- CWindow.Flag_1 = this.ultraGrid1.ActiveRow.Cells["ZHIBIAO"].Text;
- CWindow.PLine_1 = this.ultraComboEditor1.Text;
- CWindow.STime_1 = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd");
- CWindow.ETime_1 = this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd");
- if (s2 == "连退非计划总量(t)" || s2 == "连退卷一次命中率(%)" || s2 == "待判(未判定)(t)" || s2 == "1.原料类(t)" || s2 == "连退表面缺陷量(t)"
- || s2 == "2.酸轧类(t)" || s2 == "3.连退类(t)" || s2 == "4.钢质类(t)" || s2 == "3.1连退平整花(t)" || s2 == "3.2连退擦划伤(t)" || s2 == "3.3连退辊印/压印(痕)(t)" || s2 == "3.4连退其它(t)")
- {
- CWindow.StartPosition = FormStartPosition.CenterScreen;
- if (CWindow.ShowDialog() == DialogResult.OK)
- {
- //null;
- }
- CWindow.Dispose();
- }
- }
- else if (s1 == "重卷")
- {
- CUIC030140 CWindow = new CUIC030140();
- CWindow.ob = this.ob;
- CWindow.Flag_1 = this.ultraGrid1.ActiveRow.Cells["ZHIBIAO"].Text;
- CWindow.PLine_1 = this.ultraComboEditor1.Text;
- CWindow.STime_1 = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd");
- CWindow.ETime_1 = this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd");
- if (s2 == "重卷非计划总量(t)" || s2 == "重卷一次命中率(%)" || s2 == "待判(未判定)(t)" || s2 == "1.原料类缺陷(t)" || s2 == "重卷表面缺陷量(t)"
- || s2 == "2.酸轧类(t)" || s2 == "3.重卷类(t)" || s2 == "3.1重卷平整花(t)" || s2 == "3.2重卷擦划伤(t)" || s2 == "3.3重卷辊印/压印(痕)(t)" || s2 == "3.4重卷其它(t)")
- {
- CWindow.StartPosition = FormStartPosition.CenterScreen;
- if (CWindow.ShowDialog() == DialogResult.OK)
- {
- //null;
- }
- CWindow.Dispose();
- }
- }
- else if (s1 == "连退重卷")
- {
- CUIC030140 CWindow = new CUIC030140();
- CWindow.ob = this.ob;
- CWindow.Flag_1 = this.ultraGrid1.ActiveRow.Cells["ZHIBIAO"].Text;
- CWindow.PLine_1 = this.ultraComboEditor1.Text;
- CWindow.STime_1 = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd");
- CWindow.ETime_1 = this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd");
- if (s2 == "非计划品量(t)")
- {
- CWindow.StartPosition = FormStartPosition.CenterScreen;
- if (CWindow.ShowDialog() == DialogResult.OK)
- {
- //null;
- }
- CWindow.Dispose();
- }
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
- try
- {
- CUIC030120 CWindow = new CUIC030120();
- CWindow.ob = this.ob;
- if (CWindow.ShowDialog() == DialogResult.OK)
- {
- //null;
- }
- CWindow.Dispose();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
-
- }
- }
|