009fb24fad2dd5828cd29a1009cd8d025b4be80c.svn-base 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using Core.Mes.ClientFrameWork;
  7. using Core.XgMes.Client.StorageBase;
  8. namespace Core.XgMes.Client.JGKC.SteelPlateManager
  9. {
  10. /// <summary>
  11. /// 中板成品发运综合查询
  12. /// </summary>
  13. public class TurnoffSendQuery : Core.XgMes.Client.StorageBase.FrmStorageBaseMode
  14. {
  15. #region "Varible"
  16. protected Infragistics.Win.Misc.UltraExpandableGroupBox exp_SetArea;
  17. private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
  18. private Infragistics.Win.Misc.UltraGroupBox Grp_QueryCondition;
  19. private Infragistics.Win.UltraWinGrid.UltraGrid Grd_Report;
  20. #endregion
  21. private Core.XgMes.Client.JGKC.SteelPlateManager.UCSendQuery ucSendQuery1;
  22. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_AllowFilter;
  23. private Core.XgMes.Client.JGKC.SteelPlateManager.UCSendStat ucSendStat1;
  24. private System.Windows.Forms.Splitter splitter1;
  25. private Infragistics.Win.UltraWinEditors.UltraCheckEditor chk_IsOut;
  26. /// <summary>
  27. /// 必需的设计器变量。
  28. /// </summary>
  29. private System.ComponentModel.Container components = null;
  30. public TurnoffSendQuery()
  31. {
  32. //
  33. // Windows 窗体设计器支持所必需的
  34. //
  35. InitializeComponent();
  36. //
  37. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  38. //
  39. }
  40. /// <summary>
  41. /// 清理所有正在使用的资源。
  42. /// </summary>
  43. protected override void Dispose( bool disposing )
  44. {
  45. if( disposing )
  46. {
  47. if(components != null)
  48. {
  49. components.Dispose();
  50. }
  51. }
  52. base.Dispose( disposing );
  53. }
  54. #region Windows 窗体设计器生成的代码
  55. /// <summary>
  56. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  57. /// 此方法的内容。
  58. /// </summary>
  59. private void InitializeComponent()
  60. {
  61. Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
  62. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  63. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  64. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  65. Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
  66. Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
  67. Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
  68. Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
  69. Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
  70. this.exp_SetArea = new Infragistics.Win.Misc.UltraExpandableGroupBox();
  71. this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
  72. this.Grp_QueryCondition = new Infragistics.Win.Misc.UltraGroupBox();
  73. this.splitter1 = new System.Windows.Forms.Splitter();
  74. this.ucSendStat1 = new Core.XgMes.Client.JGKC.SteelPlateManager.UCSendStat();
  75. this.chk_AllowFilter = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  76. this.ucSendQuery1 = new Core.XgMes.Client.JGKC.SteelPlateManager.UCSendQuery();
  77. this.Grd_Report = new Infragistics.Win.UltraWinGrid.UltraGrid();
  78. this.chk_IsOut = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  79. ((System.ComponentModel.ISupportInitialize)(this.BaseToolBarManager)).BeginInit();
  80. this.FrmBaseMode_Fill_Panel.SuspendLayout();
  81. this.Pal_Top.SuspendLayout();
  82. ((System.ComponentModel.ISupportInitialize)(this.Grp_Query)).BeginInit();
  83. ((System.ComponentModel.ISupportInitialize)(this.Calc_Manager)).BeginInit();
  84. this.Pal_Buttom.SuspendLayout();
  85. ((System.ComponentModel.ISupportInitialize)(this.exp_SetArea)).BeginInit();
  86. this.exp_SetArea.SuspendLayout();
  87. this.ultraExpandableGroupBoxPanel1.SuspendLayout();
  88. ((System.ComponentModel.ISupportInitialize)(this.Grp_QueryCondition)).BeginInit();
  89. this.Grp_QueryCondition.SuspendLayout();
  90. ((System.ComponentModel.ISupportInitialize)(this.Grd_Report)).BeginInit();
  91. this.SuspendLayout();
  92. //
  93. // BaseToolBarManager
  94. //
  95. this.BaseToolBarManager.MenuSettings.ForceSerialization = true;
  96. this.BaseToolBarManager.ToolbarSettings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False;
  97. //
  98. // FrmBaseMode_Fill_Panel
  99. //
  100. this.FrmBaseMode_Fill_Panel.Size = new System.Drawing.Size(1028, 424);
  101. //
  102. // _FrmBaseMode_Toolbars_Dock_Area_Left
  103. //
  104. this._FrmBaseMode_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 20);
  105. this._FrmBaseMode_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 424);
  106. //
  107. // _FrmBaseMode_Toolbars_Dock_Area_Right
  108. //
  109. this._FrmBaseMode_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(1028, 20);
  110. this._FrmBaseMode_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 424);
  111. //
  112. // _FrmBaseMode_Toolbars_Dock_Area_Top
  113. //
  114. this._FrmBaseMode_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(1028, 20);
  115. //
  116. // _FrmBaseMode_Toolbars_Dock_Area_Bottom
  117. //
  118. this._FrmBaseMode_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 444);
  119. //
  120. // Pal_Top
  121. //
  122. this.Pal_Top.Size = new System.Drawing.Size(1028, 0);
  123. //
  124. // Grp_Query
  125. //
  126. this.Grp_Query.Size = new System.Drawing.Size(1028, 0);
  127. //
  128. // Pal_Buttom
  129. //
  130. this.Pal_Buttom.Controls.Add(this.Grd_Report);
  131. this.Pal_Buttom.Controls.Add(this.exp_SetArea);
  132. this.Pal_Buttom.Location = new System.Drawing.Point(0, 0);
  133. this.Pal_Buttom.Size = new System.Drawing.Size(1028, 424);
  134. //
  135. // exp_SetArea
  136. //
  137. this.exp_SetArea.BackColor = System.Drawing.SystemColors.Control;
  138. this.exp_SetArea.Controls.Add(this.ultraExpandableGroupBoxPanel1);
  139. this.exp_SetArea.Dock = System.Windows.Forms.DockStyle.Top;
  140. this.exp_SetArea.ExpandedSize = new System.Drawing.Size(1028, 216);
  141. this.exp_SetArea.Location = new System.Drawing.Point(0, 0);
  142. this.exp_SetArea.Name = "exp_SetArea";
  143. this.exp_SetArea.Size = new System.Drawing.Size(1028, 216);
  144. this.exp_SetArea.SupportThemes = false;
  145. this.exp_SetArea.TabIndex = 2;
  146. this.exp_SetArea.Text = "统计模式及查询条件设置区域";
  147. this.exp_SetArea.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003;
  148. //
  149. // ultraExpandableGroupBoxPanel1
  150. //
  151. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.Grp_QueryCondition);
  152. this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
  153. this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(2, 22);
  154. this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
  155. this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(1024, 192);
  156. this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
  157. //
  158. // Grp_QueryCondition
  159. //
  160. appearance9.BackColor = System.Drawing.SystemColors.Control;
  161. this.Grp_QueryCondition.ContentAreaAppearance = appearance9;
  162. this.Grp_QueryCondition.Controls.Add(this.chk_IsOut);
  163. this.Grp_QueryCondition.Controls.Add(this.splitter1);
  164. this.Grp_QueryCondition.Controls.Add(this.ucSendStat1);
  165. this.Grp_QueryCondition.Controls.Add(this.chk_AllowFilter);
  166. this.Grp_QueryCondition.Controls.Add(this.ucSendQuery1);
  167. this.Grp_QueryCondition.Dock = System.Windows.Forms.DockStyle.Fill;
  168. this.Grp_QueryCondition.Location = new System.Drawing.Point(0, 0);
  169. this.Grp_QueryCondition.Name = "Grp_QueryCondition";
  170. this.Grp_QueryCondition.Size = new System.Drawing.Size(1024, 192);
  171. this.Grp_QueryCondition.SupportThemes = false;
  172. this.Grp_QueryCondition.TabIndex = 1;
  173. this.Grp_QueryCondition.Text = "查询条件";
  174. this.Grp_QueryCondition.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003;
  175. //
  176. // splitter1
  177. //
  178. this.splitter1.Location = new System.Drawing.Point(752, 20);
  179. this.splitter1.Name = "splitter1";
  180. this.splitter1.Size = new System.Drawing.Size(3, 170);
  181. this.splitter1.TabIndex = 146;
  182. this.splitter1.TabStop = false;
  183. //
  184. // ucSendStat1
  185. //
  186. this.ucSendStat1.Dock = System.Windows.Forms.DockStyle.Fill;
  187. this.ucSendStat1.Location = new System.Drawing.Point(752, 20);
  188. this.ucSendStat1.Name = "ucSendStat1";
  189. this.ucSendStat1.Size = new System.Drawing.Size(270, 170);
  190. this.ucSendStat1.TabIndex = 145;
  191. //
  192. // chk_AllowFilter
  193. //
  194. this.chk_AllowFilter.Location = new System.Drawing.Point(559, 167);
  195. this.chk_AllowFilter.Name = "chk_AllowFilter";
  196. this.chk_AllowFilter.Size = new System.Drawing.Size(48, 20);
  197. this.chk_AllowFilter.TabIndex = 144;
  198. this.chk_AllowFilter.TabStop = false;
  199. this.chk_AllowFilter.Text = "过滤";
  200. this.chk_AllowFilter.CheckedChanged += new System.EventHandler(this.chk_AllowFilter_CheckedChanged);
  201. //
  202. // ucSendQuery1
  203. //
  204. this.ucSendQuery1.Dock = System.Windows.Forms.DockStyle.Left;
  205. this.ucSendQuery1.Location = new System.Drawing.Point(2, 20);
  206. this.ucSendQuery1.Name = "ucSendQuery1";
  207. this.ucSendQuery1.Size = new System.Drawing.Size(750, 170);
  208. this.ucSendQuery1.TabIndex = 0;
  209. //
  210. // Grd_Report
  211. //
  212. this.Grd_Report.CalcManager = this.Calc_Manager;
  213. this.Grd_Report.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.True;
  214. appearance1.BackColor = System.Drawing.SystemColors.ActiveBorder;
  215. appearance1.BackColor2 = System.Drawing.SystemColors.ControlDark;
  216. appearance1.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
  217. appearance1.BorderColor = System.Drawing.SystemColors.Window;
  218. this.Grd_Report.DisplayLayout.GroupByBox.Appearance = appearance1;
  219. appearance2.ForeColor = System.Drawing.SystemColors.GrayText;
  220. this.Grd_Report.DisplayLayout.GroupByBox.BandLabelAppearance = appearance2;
  221. this.Grd_Report.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  222. this.Grd_Report.DisplayLayout.GroupByBox.Hidden = true;
  223. appearance3.BackColor = System.Drawing.SystemColors.ControlLightLight;
  224. appearance3.BackColor2 = System.Drawing.SystemColors.Control;
  225. appearance3.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  226. appearance3.ForeColor = System.Drawing.SystemColors.GrayText;
  227. this.Grd_Report.DisplayLayout.GroupByBox.PromptAppearance = appearance3;
  228. this.Grd_Report.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.RaisedSoft;
  229. this.Grd_Report.DisplayLayout.Override.CellPadding = 0;
  230. appearance4.BackColor = System.Drawing.SystemColors.Control;
  231. appearance4.BackColor2 = System.Drawing.SystemColors.ControlDark;
  232. appearance4.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
  233. appearance4.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  234. appearance4.BorderColor = System.Drawing.SystemColors.Window;
  235. this.Grd_Report.DisplayLayout.Override.GroupByRowAppearance = appearance4;
  236. appearance5.BackColor = System.Drawing.Color.LightSteelBlue;
  237. appearance5.TextHAlign = Infragistics.Win.HAlign.Center;
  238. this.Grd_Report.DisplayLayout.Override.HeaderAppearance = appearance5;
  239. this.Grd_Report.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.Select;
  240. this.Grd_Report.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
  241. this.Grd_Report.DisplayLayout.Override.MinRowHeight = 21;
  242. appearance6.BackColor = System.Drawing.SystemColors.Window;
  243. appearance6.BorderColor = System.Drawing.Color.Silver;
  244. this.Grd_Report.DisplayLayout.Override.RowAppearance = appearance6;
  245. appearance7.BackColor = System.Drawing.Color.LightSteelBlue;
  246. this.Grd_Report.DisplayLayout.Override.RowSelectorAppearance = appearance7;
  247. this.Grd_Report.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement;
  248. this.Grd_Report.DisplayLayout.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
  249. this.Grd_Report.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;
  250. this.Grd_Report.DisplayLayout.Override.SelectTypeCell = Infragistics.Win.UltraWinGrid.SelectType.None;
  251. appearance8.BackColor = System.Drawing.SystemColors.ControlLight;
  252. this.Grd_Report.DisplayLayout.Override.TemplateAddRowAppearance = appearance8;
  253. this.Grd_Report.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
  254. this.Grd_Report.Dock = System.Windows.Forms.DockStyle.Fill;
  255. this.Grd_Report.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  256. this.Grd_Report.Location = new System.Drawing.Point(0, 216);
  257. this.Grd_Report.Name = "Grd_Report";
  258. this.Grd_Report.Size = new System.Drawing.Size(1028, 208);
  259. this.Grd_Report.TabIndex = 42;
  260. //
  261. // chk_IsOut
  262. //
  263. this.chk_IsOut.Location = new System.Drawing.Point(606, 167);
  264. this.chk_IsOut.Name = "chk_IsOut";
  265. this.chk_IsOut.Size = new System.Drawing.Size(48, 20);
  266. this.chk_IsOut.TabIndex = 147;
  267. this.chk_IsOut.TabStop = false;
  268. this.chk_IsOut.Text = "出口";
  269. //
  270. // TurnoffSendQuery
  271. //
  272. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  273. this.ClientSize = new System.Drawing.Size(1028, 444);
  274. this.Name = "TurnoffSendQuery";
  275. this.Text = "TurnoffSendQuery";
  276. this.Load += new System.EventHandler(this.TurnoffSendQuery_Load);
  277. ((System.ComponentModel.ISupportInitialize)(this.BaseToolBarManager)).EndInit();
  278. this.FrmBaseMode_Fill_Panel.ResumeLayout(false);
  279. this.Pal_Top.ResumeLayout(false);
  280. ((System.ComponentModel.ISupportInitialize)(this.Grp_Query)).EndInit();
  281. ((System.ComponentModel.ISupportInitialize)(this.Calc_Manager)).EndInit();
  282. this.Pal_Buttom.ResumeLayout(false);
  283. ((System.ComponentModel.ISupportInitialize)(this.exp_SetArea)).EndInit();
  284. this.exp_SetArea.ResumeLayout(false);
  285. this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
  286. ((System.ComponentModel.ISupportInitialize)(this.Grp_QueryCondition)).EndInit();
  287. this.Grp_QueryCondition.ResumeLayout(false);
  288. ((System.ComponentModel.ISupportInitialize)(this.Grd_Report)).EndInit();
  289. this.ResumeLayout(false);
  290. }
  291. #endregion
  292. #region "Init"
  293. public string sstyle = "";
  294. private void TurnoffSendQuery_Load(object sender, System.EventArgs e)
  295. {
  296. try
  297. {
  298. this.ToolBarToolsConfig = this.Key.Split('@')[1];
  299. this.DBFileName = this.Key.Split('@')[2];
  300. sstyle = this.Key.Split('@')[3];
  301. InitFrmDataSet();
  302. }
  303. catch(System.Exception ex)
  304. {
  305. System.Diagnostics.Debug.WriteLine(ex.ToString());
  306. }
  307. }
  308. private void InitFrmDataSet()
  309. {
  310. try
  311. {
  312. if(this.DBFileName.Trim().Length >0)
  313. {
  314. object obj = StorageBaseClass.GetEntityInfo(this.DBFileName,this.ProductName);
  315. if(obj!=null)
  316. {
  317. this._FrmDataSet = obj as System.Data.DataSet;
  318. this._FrmDataSet.Tables["KCJ_TURNOFFOUTSTORAGE"].PrimaryKey = null;
  319. this._FrmDataSet.Tables["KCJ_TURNOFFOUTSTORAGE"].Constraints.Clear();
  320. Init_Frm();
  321. }
  322. }
  323. }
  324. catch(System.Exception ex)
  325. {
  326. System.Diagnostics.Debug.WriteLine(ex.ToString());
  327. }
  328. }
  329. protected override void Init_Frm()
  330. {
  331. StorageGridHelper.SetGrid(this.Grd_Report,ref this._FrmDataSet,"KCJ_TURNOFFOUTSTORAGE",new string[]{"KCJ_TURNOFFOUTSTORAGE"});
  332. this.Grd_Report.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
  333. this.ucSendQuery1.MyDataSet = this._FrmDataSet;
  334. foreach(Infragistics.Win.UltraWinGrid.UltraGridColumn col in this.Grd_Report.DisplayLayout.Bands[0].Columns)
  335. {
  336. col.RowLayoutColumnInfo.SpanY = 1;
  337. col.RowLayoutColumnInfo.SpanX = 1;
  338. }
  339. }
  340. #endregion
  341. #region "ToolBarButton"
  342. protected override bool Query()
  343. {
  344. try
  345. {
  346. this._FrmDataSet.Tables["KCJ_TURNOFFOUTSTORAGE"].Clear();
  347. string where =this.ucSendQuery1.WhereStr;
  348. System.Collections.ArrayList ps = new ArrayList();
  349. System.Collections.ArrayList pg = new ArrayList();
  350. System.Collections.ArrayList ps0 = this.ucSendStat1.SendSelectStr;
  351. System.Collections.ArrayList pg0 = this.ucSendStat1.SendGroupbyStr;
  352. System.Collections.ArrayList ps1 = this.ucSendStat1.ClearSendSelectStr;
  353. System.Collections.ArrayList ps3 = this.ucSendStat1.SendSelectStr1;
  354. System.Collections.ArrayList pg3 = this.ucSendStat1.SendGroupbyStr;
  355. //string where1 = " ";
  356. if (where.IndexOf("A.CLEARFLAG") < 0 && where.IndexOf("A.SENDTYPE='8'") <= 0 && chk_IsOut.Checked==false)
  357. {
  358. ps.AddRange(ps0);
  359. ps.AddRange(ps1);
  360. pg.AddRange(pg0);
  361. pg.AddRange(ps1);
  362. }
  363. else if(where.IndexOf("A.CLEARFLAG='0'")>=0)
  364. {
  365. ps.AddRange(ps0);
  366. pg.AddRange(pg0);
  367. }
  368. string strerr = "";
  369. object obj = "";
  370. obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("BJZWStuff", "Core.XgMes.Server.JGKC.SteelPlateManager.TurnoffReportList",
  371. "GetOutStorageData", new object[] { where, ps, pg }, out strerr);
  372. if(obj!=null)
  373. {
  374. this._FrmDataSet.Merge(obj as System.Data.DataSet);
  375. this._FrmDataSet.AcceptChanges();
  376. foreach(System.Data.DataColumn col in this._FrmDataSet.Tables["KCJ_TURNOFFOUTSTORAGE"].Columns)
  377. {
  378. if(!((System.Data.DataSet)obj).Tables[0].Columns.Contains(col.ColumnName))
  379. {
  380. this.Grd_Report.DisplayLayout.Bands[0].Columns[col.ColumnName].Hidden = true;
  381. }
  382. else
  383. {
  384. this.Grd_Report.DisplayLayout.Bands[0].Columns[col.ColumnName].Hidden = false;
  385. }
  386. }
  387. }
  388. return true;
  389. }
  390. catch(System.Exception ex)
  391. {
  392. System.Diagnostics.Debug.WriteLine(ex.ToString());
  393. return false;
  394. }
  395. }
  396. public void Export()
  397. {
  398. try
  399. {
  400. string filename = @"成品发运.xls";
  401. base.ultraGridExcelExporter.Export(this.Grd_Report,filename);
  402. System.Diagnostics.ProcessStartInfo st = new System.Diagnostics.ProcessStartInfo(filename);
  403. st.WindowStyle =System.Diagnostics.ProcessWindowStyle.Maximized ;
  404. System.Diagnostics.Process.Start(st);
  405. }
  406. catch(System.Exception ex)
  407. {
  408. System.Diagnostics.Debug.WriteLine(ex.ToString());
  409. }
  410. }
  411. #endregion
  412. private void chk_AllowFilter_CheckedChanged(object sender, System.EventArgs e)
  413. {
  414. if (this.chk_AllowFilter.Checked)
  415. {
  416. this.Grd_Report.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.True;
  417. }
  418. else
  419. {
  420. this.Grd_Report.DisplayLayout.Bands[0].ColumnFilters.ClearAllFilters();
  421. this.Grd_Report.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
  422. }
  423. }
  424. }
  425. }