reportOutput.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using System.Collections;
  11. using Core.Mes.Client.Comm.Control;
  12. using Core.Mes.Client.Comm.Tool;
  13. using Core.Mes.Client.Comm.Server;
  14. using Core.StlMes.Client.YdmStuffManage;
  15. using Core.StlMes.Client.YdmStuffReport.Entity;
  16. using Infragistics.Win.UltraWinGrid;
  17. namespace Core.StlMes.Client.YdmStuffReport
  18. {
  19. public partial class reportOutput : FrmBase
  20. {
  21. public reportOutput()
  22. {
  23. InitializeComponent();
  24. }
  25. ArrayList alistChecked = null;
  26. private string[] arr = null;
  27. private string[] belongArr = null;
  28. private void reportOutput_Load(object sender, EventArgs e)
  29. {
  30. RegStartTime.Value = DateTime.Parse(new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToString());
  31. DateTime d1 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
  32. RegEndTime.Value = DateTime.Parse(d1.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd") + " 23:59:59");
  33. dateYearMoth.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM"));
  34. EntityHelper.ShowGridCaption<YdmGpOutlistEntity>(ultraGrid1.DisplayLayout.Bands[0]);
  35. arr = BaseMethod.WarehousePermissionsStore(this.ValidDataPurviewIds,ob);
  36. belongArr = this.ValidDataPurviewIds;
  37. switch (this.CustomInfo)
  38. {
  39. case "BELONG_CODE":
  40. this.ultraOptionSet1.Visible = false;
  41. this.ultraGrid1.DisplayLayout.Bands[0].Columns["CHK"].Hidden = true;
  42. this.ultraGrid1.DisplayLayout.Bands[0].Columns["OutstockDoc"].Hidden = true;
  43. break;
  44. }
  45. try
  46. {
  47. alistChecked = new ArrayList();
  48. alistChecked.Add("StoveNo");
  49. alistChecked.Add("JudgeStoveNo");
  50. alistChecked.Add("MaterialName");
  51. alistChecked.Add("ActLen");
  52. alistChecked.Add("SoureName");
  53. alistChecked.Add("Dimater");
  54. alistChecked.Add("Gradename");
  55. alistChecked.Add("LotNo");
  56. alistChecked.Add("StorageName");
  57. alistChecked.Add("LocationNo");
  58. alistChecked.Add("OutstockTypeName");
  59. alistChecked.Add("TarStorageName");
  60. alistChecked.Add("IsDealer");
  61. alistChecked.Add("BackFlag");
  62. alistChecked.Add("PlineName");
  63. alistChecked.Add("PtWeight");
  64. alistChecked.Add("OutstockTime");
  65. }
  66. catch { }
  67. try
  68. {
  69. ArrayList alist = new ArrayList();
  70. alist.Add("ActCount");
  71. alist.Add("ActWeight");
  72. alist.Add("PtWeight");
  73. CommonMethod.GeneralCheckedListboxItems(ref this.myCheckedListBox1, ref this.ultraGrid1, alist, alistChecked);
  74. }
  75. catch { }
  76. }
  77. /// <summary>
  78. /// 重写基类方法
  79. /// </summary>
  80. /// <param name="sender"></param>
  81. /// <param name="ToolbarKey"></param>
  82. public override void ToolBar_Click(object sender, string ToolbarKey)
  83. {
  84. switch (ToolbarKey)
  85. {
  86. case "Query":
  87. QueryData();
  88. break;
  89. case "Export":
  90. ExportData();
  91. break;
  92. case "Print":
  93. print();
  94. break;
  95. case "Close":
  96. this.Close();
  97. break;
  98. }
  99. }
  100. /// <summary>
  101. /// 查询
  102. /// </summary>
  103. private void QueryData()
  104. {
  105. List<YdmGpOutlistEntity> listSource = null;
  106. if (this.chkStoveNo.Checked && string.IsNullOrEmpty(this.txtStoveNo.Text))
  107. {
  108. MessageUtil.ShowTips("请输入炉号!");
  109. this.txtStoveNo.Focus();
  110. return;
  111. }
  112. string stoveNo = "";
  113. string judgeNo = "";
  114. string startTim = "";
  115. string endTim = "";
  116. string bathYearMoth = "";
  117. ArrayList list = new ArrayList();
  118. string strSql = "";
  119. string strGroup = "";
  120. string strOut = "";
  121. string strPlnSql = "";
  122. if (chkoutputTim.Checked)
  123. {
  124. startTim = this.RegStartTime.Value.ToString();
  125. endTim = this.RegEndTime.Value.ToString();
  126. strOut += " and t.OUTSTOCK_TIME >= to_date('" + startTim + "', 'yyyy-MM-dd HH24:mi:ss') and t.OUTSTOCK_TIME <= to_date('" + endTim + "', 'yyyy-MM-dd HH24:mi:ss')";
  127. }
  128. if (chkStoveNo.Checked)
  129. {
  130. stoveNo = this.txtStoveNo.Text;
  131. strOut += " and t.STOVE_NO = '" + stoveNo + "'";
  132. }
  133. if (chkJudgeNo.Checked)
  134. {
  135. judgeNo = this.txtJudgeNo.Text;
  136. strOut += " and t.JUDGE_STOVE_NO ='" + judgeNo + "'";
  137. }
  138. if(chkYearMoth.Checked)
  139. {
  140. bathYearMoth = this.dateYearMoth.Value.ToString("yyyyMM");
  141. strOut += " and t.BAL_YEAR_MONTH ='" + bathYearMoth + "'";
  142. }
  143. string strKey = "";
  144. CheckBox item;
  145. for (int i = 0; i < this.myCheckedListBox1.Controls.Count; i++)
  146. {
  147. try
  148. {
  149. item = this.myCheckedListBox1.Controls[i] as CheckBox;
  150. if (item != null && item.Checked)
  151. {
  152. strKey = item.Name;
  153. if (strKey.Equals("StoveNo"))
  154. {
  155. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.STOVE_NO";
  156. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.STOVE_NO";
  157. }
  158. else if (strKey.Equals("JudgeStoveNo"))
  159. {
  160. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.JUDGE_STOVE_NO";
  161. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.JUDGE_STOVE_NO";
  162. strPlnSql += " AND F.JUDGE_STOVE_NO = D.JUDGE_STOVE_NO";
  163. }
  164. else if (strKey.Equals("OutstockTypeName"))
  165. {
  166. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.OUTSTOCK_TYPE_NAME";
  167. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUTSTOCK_TYPE_NAME";
  168. }
  169. else if (strKey.Equals("MaterialName"))
  170. {
  171. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.MATERIAL_NAME";
  172. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.MATERIAL_NAME";
  173. }
  174. else if (strKey.Equals("Gradename"))
  175. {
  176. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.GRADENAME";
  177. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.GRADENAME";
  178. }
  179. else if (strKey.Equals("StdName"))
  180. {
  181. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.STD_NAME";
  182. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.STD_NAME";
  183. }
  184. else if (strKey.Equals("Dimater"))
  185. {
  186. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.DIMATER";
  187. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.DIMATER";
  188. }
  189. else if (strKey.Equals("FixNum"))
  190. {
  191. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.FIX_NUM";
  192. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.FIX_NUM";
  193. }
  194. else if (strKey.Equals("FixLen"))
  195. {
  196. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.FIX_LEN";
  197. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.FIX_LEN";
  198. }
  199. else if (strKey.Equals("ActLen"))
  200. {
  201. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.ACT_LEN";
  202. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.ACT_LEN";
  203. }
  204. else if (strKey.Equals("StorageName"))
  205. {
  206. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "(SELECT M.STORAGE_NAME FROM YDM_BS_STORAGE M WHERE M.STORAGE_NO = T.STORAGE_NO)STORAGE_NAME";
  207. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "T.STORAGE_NO";
  208. }
  209. else if(strKey.Equals("LocationNo"))
  210. {
  211. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "(SELECT M.LOCATION_NAME FROM YDM_BS_LOCATION M WHERE M.LOCATION_NO = T.LOCATION_NO)LOCATION_NO";
  212. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "T.LOCATION_NO";
  213. }
  214. else if (strKey.Equals("TarStorageName"))
  215. {
  216. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "s.STORAGE_NAME as TAR_STORAGE_NAME ";
  217. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "s.STORAGE_NAME";
  218. }
  219. else if (strKey.Equals("BelongName"))
  220. {
  221. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.BELONG_NAME";
  222. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.BELONG_NAME";
  223. }
  224. else if (strKey.Equals("PlineName"))
  225. {
  226. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.PLINE_NAME";
  227. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.PLINE_NAME";
  228. }
  229. else if (strKey.Equals("OutstockTime"))
  230. {
  231. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "to_char(t.OUTSTOCK_TIME,'YYYY-MM-DD HH24:MI:SS') as OUTSTOCK_TIME";
  232. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUTSTOCK_TIME";
  233. }
  234. else if (strKey.Equals("OutstockTimeS"))
  235. {
  236. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "MAX(to_char(t.OUTSTOCK_TIME,'YYYY-MM-DD')) as OUTSTOCK_TIME_S";
  237. }
  238. else if (strKey.Equals("BalYearMonth"))
  239. {
  240. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.BAL_YEAR_MONTH";
  241. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.BAL_YEAR_MONTH";
  242. }
  243. else if (strKey.Equals("OutBc"))
  244. {
  245. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "DECODE(t.OUT_BC,'1','早','2','中','3','夜')OUT_BC";
  246. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUT_BC";
  247. }
  248. else if (strKey.Equals("OutBz"))
  249. {
  250. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "DECODE(t.OUT_BZ,'1','甲','2','乙','3','丙','4','丁')OUT_BZ";
  251. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUT_BZ";
  252. }
  253. else if (strKey.Equals("MatGowhereName"))
  254. {
  255. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.MAT_GOWHERE_NAME";
  256. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.MAT_GOWHERE_NAME";
  257. }
  258. else if (strKey.Equals("Gptype"))
  259. {
  260. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + " CASE WHEN T.MATERIAL_NAME LIKE 'PA%' then '铸坯'WHEN T.MATERIAL_NAME LIKE 'PB%' then'锻坯'WHEN T.MATERIAL_NAME LIKE 'PC%' then'轧坯'WHEN T.MATERIAL_NAME LIKE 'PD%' then'钢锭'END GPTYPE";
  261. }
  262. else if (strKey.Equals("LotNo"))
  263. {
  264. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.LOT_NO";
  265. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.LOT_NO";
  266. }else if(strKey.Equals("SoureName"))
  267. {
  268. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.SOURE_NAME";
  269. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.SOURE_NAME";
  270. }else if(strKey.Equals("IsDealer"))
  271. {
  272. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "DECODE(T.IS_DEALER,'0','自用','1','双经销','2','来料加工','3','定销订购')IS_DEALER";
  273. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.IS_DEALER";
  274. }
  275. else if (strKey.Equals("BackFlag"))
  276. {
  277. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "DECODE(T.BACK_FLAG,'0','正常坯','1','回炉坯','2','套尺坯','3','掉队坯')BACK_FLAG";
  278. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.BACK_FLAG";
  279. }
  280. else if (strKey.Equals("OutstockDoc"))
  281. {
  282. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",") + "t.OUTSTOCK_DOC";
  283. strGroup += (string.IsNullOrEmpty(strGroup) ? "" : ",") + "t.OUTSTOCK_DOC";
  284. }
  285. else if (strKey.Equals("CHK"))
  286. {
  287. }
  288. else
  289. {
  290. strSql += (string.IsNullOrEmpty(strSql) ? "t." : ",t.") + strKey;
  291. strGroup += (string.IsNullOrEmpty(strGroup) ? "t." : ",t.") + strKey;
  292. }
  293. }
  294. }
  295. catch { }
  296. }
  297. strSql += (string.IsNullOrEmpty(strSql) ? "" : ",");
  298. if (string.IsNullOrEmpty(strGroup))
  299. {
  300. strGroup = strOut + (string.IsNullOrEmpty(strGroup) ? "" : "group by ") + strGroup + " ORDER BY T.OUTSTOCK_TIME DESC";
  301. }
  302. else
  303. {
  304. strGroup = strOut + (string.IsNullOrEmpty(strGroup) ? "" : "group by ") + strGroup + " ,T.OUTSTOCK_TIME ORDER BY T.OUTSTOCK_TIME DESC";
  305. }
  306. switch (this.CustomInfo)
  307. {
  308. case "STORAGE_NO":
  309. if (this.ultraOptionSet1.CheckedItem.DataValue.ToString().Equals("0"))
  310. {
  311. strOut = " AND t.TAR_REC_FLAG = '0'AND T.OUTSTOCK_TYPE_CODE = '800803'";
  312. }
  313. else
  314. {
  315. strOut = " and ((T.OUTSTOCK_TYPE_CODE = '800803' and t.TAR_REC_FLAG = '1') OR T.OUTSTOCK_TYPE_CODE IN ('800801', '800802','800804','800805','800806','800811'))";
  316. }
  317. break;
  318. }
  319. string _sql = strOut + strGroup;
  320. list.Add(strSql);
  321. list.Add(strOut);
  322. list.Add(strGroup);
  323. switch(this.CustomInfo)
  324. {
  325. case"STORAGE_NO":
  326. listSource = EntityHelper.GetData<YdmGpOutlistEntity>(
  327. "Core.LgMes.Server.Stuffmanage.Report.FrmReportOutput.doQueryData", new object[] { list, arr, strPlnSql, bathYearMoth }, this.ob);
  328. break;
  329. case"BELONG_CODE":
  330. listSource = EntityHelper.GetData<YdmGpOutlistEntity>(
  331. "Core.LgMes.Server.Stuffmanage.Report.FrmReportOutput.doQueryDataBelong", new object[] { list, belongArr }, this.ob);
  332. break;
  333. }
  334. YdmGpOutlistEntitybindingSource.DataSource = listSource;
  335. bool bContains = false, bChecked = false;
  336. for (int i = 0; i < this.ultraGrid1.DisplayLayout.Bands[0].Columns.Count; i++)
  337. {
  338. try
  339. {
  340. bContains = false;
  341. strKey = this.ultraGrid1.DisplayLayout.Bands[0].Columns[i].Key;
  342. for (int j = 0; j < this.myCheckedListBox1.Controls.Count; j++)
  343. {
  344. try
  345. {
  346. item = this.myCheckedListBox1.Controls[j] as CheckBox;
  347. if (item.Name.Equals(strKey))
  348. {
  349. bContains = true;
  350. bChecked = item.Checked;
  351. break;
  352. }
  353. }
  354. catch { }
  355. }
  356. if (bContains)
  357. {
  358. this.ultraGrid1.DisplayLayout.Bands[0].Columns[i].Hidden = !bChecked;
  359. }
  360. }
  361. catch { }
  362. }
  363. this.SetStaticsInfo();
  364. CommonMethod.SetGridSumArea(this.ultraGrid1);
  365. }
  366. private void SetStaticsInfo()
  367. {
  368. try
  369. {
  370. if (this.ultraGrid1.Rows.Count == 0)
  371. {
  372. this.ultraGrid1.DisplayLayout.Bands[0].Summaries.Clear();
  373. }
  374. else
  375. {
  376. ArrayList alist = new ArrayList();
  377. alist.Add("ActCount");
  378. alist.Add("ActWeight");
  379. alist.Add("PtWeight");
  380. CommonMethod.SetStaticsInfoSum(ref this.ultraGrid1, alist, true);
  381. }
  382. }
  383. catch { }
  384. }
  385. /// <summary>
  386. /// 导出
  387. /// </summary>
  388. private void ExportData()
  389. {
  390. GridHelper.ulGridToExcel(ultraGrid1, "出库实绩总汇");
  391. }
  392. /// <summary>
  393. /// 全选
  394. /// </summary>
  395. /// <param name="sender"></param>
  396. /// <param name="e"></param>
  397. private void myLinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  398. {
  399. this.myCheckedListBox1.CheckAll();
  400. }
  401. /// <summary>
  402. /// 清除
  403. /// </summary>
  404. /// <param name="sender"></param>
  405. /// <param name="e"></param>
  406. private void myLinkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  407. {
  408. this.myCheckedListBox1.UnCheckAll();
  409. }
  410. /// <summary>
  411. /// 默认
  412. /// </summary>
  413. /// <param name="sender"></param>
  414. /// <param name="e"></param>
  415. private void myLinkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  416. {
  417. CheckBox items;
  418. for (int i = 0; i < this.myCheckedListBox1.Controls.Count; i++)
  419. {
  420. try
  421. {
  422. items = this.myCheckedListBox1.Controls[i] as CheckBox;
  423. if (alistChecked.Contains(items.Name))
  424. {
  425. items.Checked = true;
  426. }
  427. else
  428. {
  429. items.Checked = false;
  430. }
  431. }
  432. catch { }
  433. }
  434. }
  435. private void chkInputTim_CheckedChanged(object sender, EventArgs e)
  436. {
  437. //this.RegStartTime.Enabled = this.chkInputTim.Checked;
  438. //this.RegEndTime.Enabled = this.chkInputTim.Checked;
  439. }
  440. private void chkStoveNo_CheckedChanged(object sender, EventArgs e)
  441. {
  442. this.txtStoveNo.Enabled = this.chkStoveNo.Checked;
  443. }
  444. private void chkJudgeNo_CheckedChanged(object sender, EventArgs e)
  445. {
  446. this.txtJudgeNo.Enabled = this.chkJudgeNo.Checked;
  447. }
  448. private void chkGroup_CheckedChanged(object sender, EventArgs e)
  449. {
  450. CommonMethod.SetGridGroupBy(ref this.ultraGrid1, this.chkGroup.Checked);
  451. CommonMethod.SetGridSumArea(this.ultraGrid1);
  452. }
  453. private void txtStoveNo_KeyDown(object sender, KeyEventArgs e)
  454. {
  455. if (e.KeyValue == 13)
  456. {
  457. QueryData();
  458. }
  459. }
  460. private void txtJudgeNo_KeyDown(object sender, KeyEventArgs e)
  461. {
  462. if (e.KeyValue == 13)
  463. {
  464. QueryData();
  465. }
  466. }
  467. private void chkYearMoth_CheckedChanged(object sender, EventArgs e)
  468. {
  469. this.dateYearMoth.Enabled = this.chkYearMoth.Checked;
  470. }
  471. /// <summary>
  472. /// 打印管坯库出库台账
  473. /// </summary>
  474. private void print()
  475. {
  476. this.ultraGrid1.UpdateData();
  477. int m = 0;
  478. int n = 0;
  479. string OutstockDoc = "";
  480. IQueryable<UltraGridRow> checkMagRows = this.ultraGrid1.Rows.AsQueryable().Where(" CHK = 'True'");
  481. if (checkMagRows.Count() == 0)
  482. {
  483. MessageUtil.ShowTips("请选择需要打印的信息!");
  484. return;
  485. }
  486. foreach (UltraGridRow row in checkMagRows)
  487. {
  488. if (n == 0)
  489. {
  490. OutstockDoc = row.Cells["OutstockDoc"].Text;
  491. }
  492. else
  493. {
  494. OutstockDoc = OutstockDoc + "','" + row.Cells["OutstockDoc"].Text;
  495. }
  496. n = n + 1;
  497. }
  498. string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepGpOutListTH.cpt&OUTSTOCK_DOC=" + OutstockDoc + "&BC=" + this.UserInfo.GetUserOrder() + "&BZ=" + this.UserInfo.GetUserGroup();
  499. FrmExcel fre = new FrmExcel(this.ob, strurl);
  500. fre.AutoSize = true;
  501. fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
  502. fre.WindowState = FormWindowState.Maximized;
  503. fre.Show();
  504. }
  505. }
  506. }