FrmHttInOnlineStore.cs 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020
  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.Server;
  12. using Core.Mes.Client.Comm.Tool;
  13. using Core.Mes.Client.Comm.Control;
  14. using Infragistics.Win.UltraWinGrid;
  15. using Core.Mes.Client.Comm.Format;
  16. using Infragistics.Win.UltraWinEditors;
  17. using Infragistics.Win;
  18. using com.steering.mes.mcp.entity;
  19. using Core.StlMes.Client.Mcp.Control;
  20. namespace Core.StlMes.Client.Mcp.Treatment
  21. {
  22. public partial class FrmHttInOnlineStore : FrmBase
  23. {
  24. public FrmHttInOnlineStore()
  25. {
  26. InitializeComponent();
  27. }
  28. private string SlGx = "";//交库工序
  29. private string plineCode = "";
  30. private string departm = ""; //部门
  31. private string SlGxname = "";//交库名称
  32. private string stono = ""; //仓库代码
  33. private string deparNo = ""; //部门ID
  34. private string manage = ""; //科室id
  35. private string manageNmae = ""; //科室名称
  36. private string dingwei = "";
  37. private void FrmInOnlineStore_Load(object sender, EventArgs e)
  38. {
  39. DateTime now = DateTime.Now;
  40. DateTime dt1 = new DateTime(now.Year, now.Month, 1);//当月第一天
  41. DateTime dt2 = dt1.AddMonths(1).AddDays(-1);//当月最后一天
  42. StartTime.Value = DateTime.Parse(dt1.ToString("yyyy-MM-dd") + " 00:00:00");
  43. EndTime.Value = DateTime.Parse(dt2.ToString("yyyy-MM-dd") + " 23:59:59");
  44. StartTime1.Value = DateTime.Parse(dt1.ToString("yyyy-MM-dd") + " 00:00:00");
  45. EndTime1.Value = DateTime.Parse(dt2.ToString("yyyy-MM-dd") + " 23:59:59");
  46. //去向
  47. DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.WarehousePermissions.getWarehousePermissionsStore", null, this.ob);//如果是“”里面添加的是条件
  48. cmbStorage.DataSource = dt;
  49. cmbStorage.DisplayMember = "STORAGE_NAME";
  50. cmbStorage.ValueMember = "STORAGE_NO";
  51. YdmBaseClass.SetComboItemHeight(cmbStorage);
  52. manageNmae = UserInfo.GetDepartment();
  53. plineCode = YdmBaseClass.GetPCode(manageNmae, this.ob);//获取 用户 对应的产线
  54. //获取工序
  55. DataTable dt3 = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryGX", new object[] { "600211" }, this.ob);
  56. if (dt3.Rows.Count > 0)
  57. {
  58. SlGx = dt3.Rows[0]["BASECODE"].ToString();
  59. SlGxname = dt3.Rows[0]["BASENAME"].ToString();
  60. }
  61. manage = UserInfo.GetDeptid();
  62. deparNo = Core.StlMes.Client.Mcp.Control.ClsBaseInfo.GetDepartIdBySectionId(manage, ob);
  63. stono = YdmBaseClass.GetStorage1(manage, deparNo, "800304", "800202", this.ob);//获取对应的仓库代码
  64. }
  65. /// <summary>
  66. /// 重写基类方法
  67. /// </summary>
  68. /// <param name="sender"></param>
  69. /// <param name="ToolbarKey"></param>
  70. public override void ToolBar_Click(object sender, string ToolbarKey)
  71. {
  72. switch (ToolbarKey)
  73. {
  74. case "DoQuery":
  75. QuerySinglePlan();
  76. break;
  77. case "DoQueryInList":
  78. DoQueryInList();
  79. break;
  80. case "cancelInList":
  81. cancelInList();
  82. break;
  83. case "DoSave":
  84. DoSave();
  85. break;
  86. case "DoBeside":
  87. doBeside();
  88. break;
  89. case "cancelDoBeside":
  90. cancelDoBeside();
  91. break;
  92. case "Close":
  93. this.Close();
  94. break;
  95. }
  96. }
  97. /// <summary>
  98. /// 打印入库单
  99. /// </summary>
  100. //private void printPipe()
  101. //{
  102. // this.ultraGrid7.UpdateData();
  103. // string jugeAppleCode = "";
  104. // IQueryable<UltraGridRow> checkRows = this.ultraGrid7.Rows.AsQueryable().Where(a=>a.GetValue("CHK") == "True");
  105. // if(checkRows.Count() == 0)
  106. // {
  107. // MessageUtil.ShowTips("请选择需要打印的判定数据信息!");
  108. // return;
  109. // }
  110. // foreach (UltraGridRow uRow in checkRows)
  111. // {
  112. // jugeAppleCode = uRow.Cells["JugdeApplyCode"].Value.ToString();
  113. // }
  114. // if (jugeAppleCode == "")
  115. // {
  116. // MessageUtil.ShowTips("未申请判定,不允许打印缴库单!");
  117. // return;
  118. // }
  119. // int jugeAppleM = checkRows.GroupBy(a => a.GetValue("JugdeApplyCode")).Count();
  120. // if (jugeAppleM > 1)
  121. // {
  122. // MessageUtil.ShowTips("只有同一申请单号的信息才允许同时打印!");
  123. // return;
  124. // }
  125. // string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilGodownEntryYM.cpt&format=pdf&JUGDE_APPLY_CODE=" + jugeAppleCode;
  126. // FrmExcel fre = new FrmExcel(this.ob, strurl);
  127. // fre.AutoSize = true;
  128. // fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
  129. // fre.WindowState = FormWindowState.Maximized;
  130. // fre.Show();
  131. //}
  132. /// <summary>
  133. /// 结炉回退
  134. /// </summary>
  135. private void cancelDoBeside()
  136. {
  137. UltraGridRow uRow = this.ultraGrid1.ActiveRow;
  138. if (uRow == null)
  139. {
  140. MessageUtil.ShowTips("无数据!");
  141. return;
  142. }
  143. string heatNo = uRow.Cells["HEAT_PLAN_NO"].Value.ToString();
  144. ArrayList list = new ArrayList();
  145. list.Add(heatNo);
  146. list.Add(uRow.Cells["JUDGE_STOVE_NO"].Value.ToString());
  147. list.Add(uRow.Cells["BATCH_NO"].Value.ToString());
  148. list.Add(uRow.Cells["PRO_PLAN_ID"].Value.ToString());
  149. list.Add(uRow.Cells["GX_PLAN_NO"].Value.ToString());
  150. if (MessageUtil.ShowYesNoAndQuestion("是否撤销结炉?") == DialogResult.No)
  151. {
  152. return;
  153. }
  154. CoreClientParam ccp = new CoreClientParam();
  155. ccp.ServerName = "com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore";
  156. ccp.MethodName = "undoBeside";
  157. ccp.ServerParams = new object[] { list, SlGx, plineCode };
  158. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  159. if (ccp.ReturnCode != -1)
  160. {
  161. MessageUtil.ShowTips(ccp.ReturnInfo);
  162. if (ccp.ReturnInfo.Equals("撤销结炉成功!"))
  163. {
  164. QuerySinglePlan();
  165. }
  166. }
  167. }
  168. /// <summary>
  169. /// 交库结炉(验证进程表数据与入库数据一致性(合格))
  170. /// </summary>
  171. private void doBeside()
  172. {
  173. UltraGridRow uRow = this.ultraGrid1.ActiveRow;
  174. if (uRow == null)
  175. {
  176. MessageUtil.ShowTips("无数据!");
  177. return;
  178. }
  179. string heatNo = uRow.Cells["HEAT_PLAN_NO"].Value.ToString();
  180. if (MessageUtil.ShowYesNoAndQuestion("是否结炉?") == DialogResult.No)
  181. {
  182. return;
  183. }
  184. CoreClientParam ccp = new CoreClientParam();
  185. ccp.ServerName = "com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore";
  186. ccp.MethodName = "doBeside";
  187. ccp.ServerParams = new object[] { heatNo, SlGx, plineCode, uRow.Cells["PRO_PLAN_ID"].Value.ToString(), uRow.Cells["GX_PLAN_NO"].Value.ToString() };
  188. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  189. if (ccp.ReturnCode != -1)
  190. {
  191. MessageUtil.ShowTips(ccp.ReturnInfo);
  192. if (ccp.ReturnInfo.Equals("结炉成功!"))
  193. {
  194. QuerySinglePlan();
  195. }
  196. }
  197. }
  198. /// <summary>
  199. /// 交库
  200. /// </summary>
  201. private void DoSave()
  202. {
  203. string strInbound = "800701";//入库类型(产出入库)
  204. string strInMemo = "";
  205. string matStart = "";//材料状态
  206. string isSamp = "";//是否样管
  207. UltraGridRow uRow = ultraGrid1.ActiveRow;
  208. if (uRow == null) return;
  209. UltraGridRow uRow3 = ultraGrid3.ActiveRow;
  210. if (uRow3 == null) return;
  211. //int addCount = 0;
  212. ArrayList list = new ArrayList();
  213. DataTable dtMemo = PipeManageClass.getComTypeInfo(strInbound, ob);
  214. if (dtMemo.Rows.Count >= 1)
  215. {
  216. strInMemo = dtMemo.Rows[0]["MEMO"].ToString();
  217. }
  218. if (uRow3.Cells["MAT_STATUS"].Value.ToString().Equals("剔除"))
  219. {
  220. matStart = "10";
  221. isSamp = "0";
  222. }
  223. else if (uRow3.Cells["MAT_STATUS"].Value.ToString().Equals("合格"))
  224. {
  225. matStart = "00";
  226. isSamp = "0";
  227. }
  228. else
  229. {
  230. matStart = "00";
  231. isSamp = "1";
  232. }
  233. if (cmbBc.Text.ToString() == "" || cmbBc.Text.ToString()==null)
  234. {
  235. MessageUtil.ShowTips("班次不能为空!");
  236. return;
  237. }
  238. if (cmbBz.Text.ToString() == "" || cmbBz.Text.ToString() == null)
  239. {
  240. MessageUtil.ShowTips("班组不能为空!");
  241. return;
  242. }
  243. if (name.Text.ToString() == "" || name.Text.ToString() == null)
  244. {
  245. MessageUtil.ShowTips("操作人不能为空!");
  246. return;
  247. }
  248. //foreach (UltraGridRow uRow1 in ultraGrid2.Rows)
  249. //{
  250. // if (Convert.ToBoolean(uRow1.Cells["CHK"].Text) == true)
  251. // {
  252. // addCount += 1;
  253. //产量差
  254. if (uRow.Cells["CLC_NUM"].Value.ToString() != "0")
  255. {
  256. MessageUtil.ShowTips("您选择的计划产量不平!");
  257. return;
  258. }
  259. if (cmbStorage.Text.ToString().Equals(""))
  260. {
  261. MessageUtil.ShowTips("去向不能为空!");
  262. return;
  263. }
  264. UltraGridRow uRow1 = ultraGrid2.ActiveRow;
  265. if (uRow1 == null) { MessageUtil.ShowTips("炉批信息无数据"); return; }
  266. if (uRow1.Cells["EDI_COUNT"].Value.ToString().Equals("0"))
  267. {
  268. MessageUtil.ShowTips("可入库支数不能为零!");
  269. return;
  270. }
  271. if (uRow1.Cells["EDI_WT"].Value.ToString().Equals("0"))
  272. {
  273. MessageUtil.ShowTips("可入库重量不能为零!");
  274. return;
  275. }
  276. ArrayList pram = new ArrayList();
  277. pram.Add(uRow.Cells["HEAT_PLAN_NO"].Text.ToString());
  278. pram.Add(uRow.Cells["JUDGE_STOVE_NO"].Text.ToString());
  279. pram.Add(uRow.Cells["BATCH_NO"].Text.ToString());
  280. pram.Add(uRow.Cells["PLAN_JG_NUM"].Value.ToString());
  281. pram.Add(uRow.Cells["PLAN_JG_WEIGHT"].Value.ToString());
  282. pram.Add(uRow1.Cells["EDI_COUNT"].Value.ToString());
  283. pram.Add(uRow.Cells["SJ_WEIGHT"].Value.ToString());
  284. pram.Add(uRow.Cells["FAIL_CUT_NUM"].Value.ToString());
  285. pram.Add(uRow.Cells["FAIL_CUT_WEIGHT"].Value.ToString());
  286. pram.Add(this.UserInfo.GetUserName());
  287. pram.Add(this.UserInfo.GetUserOrder());
  288. pram.Add(this.UserInfo.GetUserGroup());
  289. pram.Add(strInbound);
  290. pram.Add(strInMemo);
  291. pram.Add(manage);//所属单位
  292. pram.Add(manageNmae);//所属单位名称
  293. pram.Add(stono);//仓库
  294. pram.Add(matStart);
  295. pram.Add(isSamp);
  296. pram.Add(cmbStorage.Value.ToString());//去向
  297. pram.Add(cmbStorage.Text.ToString());//去向
  298. pram.Add(uRow1.Cells["ACT_COUNT"].Value.ToString());
  299. pram.Add(uRow.Cells["BATCH_GROUD_NO"].Text.ToString());
  300. pram.Add(uRow1.Cells["EDI_WT"].Value.ToString());
  301. pram.Add(cmbBc.Value.ToString());
  302. pram.Add(cmbBz.Value.ToString());
  303. pram.Add(name.Text.ToString());
  304. //list.Add(pram);
  305. // }
  306. //}
  307. //if (addCount == 0) { MessageUtil.ShowTips("请选择要交库炉批信息!"); return; }
  308. if (MessageUtil.ShowYesNoAndQuestion("是否确认交库?") == DialogResult.No)
  309. {
  310. return;
  311. }
  312. CoreClientParam ccp = new CoreClientParam();
  313. try
  314. {
  315. this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
  316. if (Constant.WaitingForm == null)
  317. {
  318. Constant.WaitingForm = new WaitingForm();
  319. }
  320. Constant.WaitingForm.ShowToUser = true;
  321. Constant.WaitingForm.Show();
  322. Constant.WaitingForm.Update();
  323. ccp.ServerName = "com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore";
  324. ccp.MethodName = "addLibraryResult";
  325. ccp.ServerParams = new object[] { pram, uRow.Cells["HEAT_PLAN_NO"].Text.ToString(), SlGx, SlGxname, plineCode };
  326. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  327. this.Cursor = Cursors.Default;
  328. Constant.WaitingForm.ShowToUser = false;
  329. Constant.WaitingForm.Close();
  330. Constant.WaitingForm = null;
  331. }
  332. catch (Exception ex)
  333. {
  334. this.Cursor = Cursors.Default;
  335. Constant.WaitingForm.ShowToUser = false;
  336. Constant.WaitingForm.Close();
  337. Constant.WaitingForm = null;
  338. }
  339. if (ccp.ReturnCode != -1)
  340. {
  341. MessageUtil.ShowTips(ccp.ReturnInfo);
  342. if (ccp.ReturnInfo.Equals("交库成功!"))
  343. {
  344. dingwei = uRow.Cells["HEAT_PLAN_NO"].Value.ToString();
  345. QuerySinglePlan();
  346. }
  347. }
  348. }
  349. /// <summary>
  350. /// 撤销交库
  351. /// </summary>
  352. private void cancelInList()
  353. {
  354. ultraGridIn.UpdateData();
  355. UltraGridRow urg = ultraGridIn.ActiveRow;
  356. if (urg == null) { MessageUtil.ShowTips("无交库信息!"); return; }
  357. int addCount = 0;
  358. ArrayList list = new ArrayList();
  359. foreach (UltraGridRow uRow in ultraGridIn.Rows)
  360. {
  361. if (Convert.ToBoolean(uRow.Cells["CHK"].Text) == true)
  362. {
  363. addCount += 1;
  364. ArrayList pram = new ArrayList();
  365. pram.Add(uRow.Cells["HEAT_PLAN_NO"].Value.ToString());
  366. pram.Add(uRow.Cells["JUDGE_STOVE_NO"].Value.ToString());
  367. pram.Add(uRow.Cells["BATCH_NO"].Value.ToString());
  368. pram.Add(uRow.Cells["BATCH_GROUD_NO"].Value.ToString());
  369. pram.Add(uRow.Cells["QCM_STAUS"].Value.ToString());
  370. pram.Add(uRow.Cells["ACT_COUNT"].Value.ToString());
  371. pram.Add(uRow.Cells["ACT_WEIGHT"].Value.ToString());
  372. pram.Add(this.UserInfo.GetUserName());
  373. pram.Add(uRow.Cells["INSTOCK_DOC"].Value.ToString());
  374. pram.Add(uRow.Cells["PRODUCT_FLAG"].Value.ToString());
  375. list.Add(pram);
  376. }
  377. }
  378. if (addCount == 0) { MessageUtil.ShowTips("请选择要撤销的交库信息!"); return; }
  379. if (MessageUtil.ShowYesNoAndQuestion("是否撤销交库信息?") == DialogResult.No)
  380. {
  381. return;
  382. }
  383. CoreClientParam ccp = new CoreClientParam();
  384. try
  385. {
  386. this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
  387. if (Constant.WaitingForm == null)
  388. {
  389. Constant.WaitingForm = new WaitingForm();
  390. }
  391. Constant.WaitingForm.ShowToUser = true;
  392. Constant.WaitingForm.Show();
  393. Constant.WaitingForm.Update();
  394. ccp.ServerName = "com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore";
  395. ccp.MethodName = "deleteLibraryResult";
  396. ccp.ServerParams = new object[] { list, SlGx, urg.Cells["JUDGE_STOVE_NO"].Value.ToString(), urg.Cells["BATCH_NO"].Value.ToString(), plineCode };
  397. ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  398. this.Cursor = Cursors.Default;
  399. Constant.WaitingForm.ShowToUser = false;
  400. Constant.WaitingForm.Close();
  401. Constant.WaitingForm = null;
  402. }
  403. catch (Exception ex)
  404. {
  405. this.Cursor = Cursors.Default;
  406. Constant.WaitingForm.ShowToUser = false;
  407. Constant.WaitingForm.Close();
  408. Constant.WaitingForm = null;
  409. }
  410. if (ccp.ReturnCode == -1) return;
  411. MessageUtil.ShowTips(ccp.ReturnInfo);
  412. if (ccp.ReturnInfo.Equals("撤销交库成功!"))
  413. {
  414. DoQueryInList();
  415. }
  416. }
  417. /// <summary>
  418. /// 查询入库实绩
  419. /// </summary>
  420. private void DoQueryInList()
  421. {
  422. string startTim = "";
  423. string endTim = "";
  424. string jugeNo = "";
  425. if (this.chkHeatNo1.Checked && this.txtHeatNo1.Text.Trim() != "")
  426. {
  427. jugeNo = this.txtHeatNo1.Text.Trim();
  428. }
  429. if (chkTim1.Checked)
  430. {
  431. if (DateTime.Parse(StartTime.Value.ToString()) > DateTime.Parse(EndTime.Value.ToString()))
  432. {
  433. MessageUtil.ShowTips("选择的前面时间不能大于后面的时间!");
  434. return;
  435. }
  436. else
  437. {
  438. startTim = this.StartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  439. endTim = this.EndTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  440. }
  441. }
  442. DataTable dt1 = ServerHelper.GetData("com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore.doQueryLibrary", new object[] { plineCode, startTim, endTim, jugeNo }, this.ob);
  443. GridHelper.CopyDataToDatatable(ref dt1, ref dataTable6, true);
  444. }
  445. /// <summary>
  446. /// 查询炉顺序
  447. /// </summary>
  448. private void QuerySinglePlan()
  449. {
  450. string startTim = "";
  451. string endTim = "";
  452. string jugeNo = "";
  453. string lotNo = "";
  454. if (this.chkJugeHeatNo.Checked && this.txtJugeNo.Text.Trim() != "")
  455. {
  456. jugeNo = this.txtJugeNo.Text.Trim();
  457. }
  458. if (chkTim.Checked)
  459. {
  460. if (DateTime.Parse(StartTime.Value.ToString()) > DateTime.Parse(EndTime.Value.ToString()))
  461. {
  462. MessageUtil.ShowTips("选择时间区间错误,请重新选择!");
  463. return;
  464. }
  465. else
  466. {
  467. startTim = this.StartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  468. endTim = this.EndTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  469. }
  470. }
  471. if (this.chkLotNo.Checked && this.txtLotNo.Text.Trim() != "")
  472. {
  473. lotNo = this.txtLotNo.Text.Trim();
  474. }
  475. HttPlan plan = new HttPlan();
  476. plan.JudgeStoveNo = jugeNo;//炉号
  477. plan.HeatPlanNo = lotNo;//炉批计划
  478. DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore.doQuerymch", new object[] { plan, plineCode, startTim, endTim, ultraOptionSet2.CheckedItem.DataValue.ToString() }, this.ob);
  479. GridHelper.CopyDataToDatatable(ref dt, ref dataTable2, true);
  480. if (dt.Rows.Count <= 0)
  481. {
  482. DataTable dt1 = new DataTable();
  483. GridHelper.CopyDataToDatatable(ref dt1, ref dataTable8, true);
  484. GridHelper.CopyDataToDatatable(ref dt1, ref dataTable7, true);
  485. GridHelper.CopyDataToDatatable(ref dt1, ref dataTable1, true);
  486. }
  487. foreach (UltraGridRow urg in ultraGrid1.Rows)
  488. {
  489. if (urg.Cells["BESIDE_STATUS"].Text.Equals("交库结炉"))
  490. {
  491. urg.Cells["BESIDE_STATUS"].Appearance.BackColor = Color.LightGray;
  492. }
  493. }
  494. if (dt.Rows.Count > 0)
  495. {
  496. for (int i = 0; i < ultraGrid1.Rows.Count; i++)
  497. {
  498. if (ultraGrid1.Rows[i].Cells["HEAT_PLAN_NO"].Value.ToString() == dingwei)
  499. {
  500. UltraGridRow row = ultraGrid1.Rows[i];
  501. row.Activate();
  502. }
  503. }
  504. }
  505. dingwei = "";
  506. }
  507. private void ultraGrid3_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
  508. {
  509. foreach (UltraGridRow uRow in ultraGrid3.Selected.Rows)
  510. {
  511. if (uRow.GetType() != typeof(Infragistics.Win.UltraWinGrid.UltraGridGroupByRow))
  512. {
  513. uRow.Cells["CHK"].Value = true;
  514. }
  515. }
  516. }
  517. //查询炉批信息里的内容
  518. private void ultraGrid3_AfterRowActivate(object sender, EventArgs e)
  519. {
  520. UltraGridRow row = ultraGrid3.ActiveRow;
  521. if (row != null)
  522. {
  523. string heatNo = row.Cells["HEAT_PLAN_NO"].Value.ToString();
  524. string matstatus = row.Cells["MAT_STATUS"].Value.ToString();
  525. string pipe = row.Cells["IS_SAMPLE_PIPE"].Value.ToString();
  526. if (matstatus == "合格")
  527. {
  528. matstatus = "00";
  529. pipe = "0";
  530. }
  531. else if (matstatus == "剔除")
  532. {
  533. matstatus = "10";
  534. pipe = "0";
  535. }
  536. else if (matstatus == "样管")
  537. {
  538. matstatus = "00";
  539. pipe = "1";
  540. }
  541. DataTable dt1 = ServerHelper.GetData("com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore.doQueryformat", new object[] { heatNo, matstatus, pipe }, ob);
  542. GridHelper.CopyDataToDatatable(ref dt1, ref dataTable8, true);
  543. }
  544. }
  545. UltraComboEditor bacthNo = new UltraComboEditor();
  546. UltraComboEditor flawStaus = new UltraComboEditor();
  547. UltraComboEditor testingStaus = new UltraComboEditor();
  548. private void ultraGrid2_CellChange(object sender, CellEventArgs e)
  549. {
  550. UltraGridRow row=ultraGrid2.ActiveRow;
  551. this.ultraGrid2.UpdateData();
  552. UltraGridRow row1 = ultraGrid3.ActiveRow;
  553. string heatNo = row1.Cells["HEAT_PLAN_NO"].Value.ToString();
  554. string matstatus = row1.Cells["MAT_STATUS"].Value.ToString();
  555. string pipe = row1.Cells["IS_SAMPLE_PIPE"].Value.ToString();
  556. if (matstatus == "合格")
  557. {
  558. matstatus = "00";
  559. pipe = "0";
  560. }
  561. else if (matstatus == "剔除")
  562. {
  563. matstatus = "10";
  564. pipe = "0";
  565. }
  566. else if (matstatus == "样管")
  567. {
  568. matstatus = "00";
  569. pipe = "1";
  570. }
  571. if (e.Cell.Column.Key == "EDI_COUNT")
  572. {
  573. if (e.Cell.Row.Cells["EDI_COUNT"].Value == null)
  574. {
  575. e.Cell.Row.Cells["EDI_COUNT"].Value = "0";
  576. }
  577. else
  578. {
  579. ultraGrid2.UpdateData();
  580. string actCount = e.Cell.Row.Cells["EDI_COUNT"].Value.ToString();
  581. if (!StringUtil.IsInt(actCount) || actCount == "0")
  582. {
  583. e.Cell.Row.Cells["EDI_COUNT"].Value = "0";
  584. e.Cell.Row.Cells["EDI_WT"].Value = "0";
  585. }
  586. else
  587. {
  588. int count=int.Parse(row.Cells["ACT_COUNT"].Value.ToString())-int.Parse(row.Cells["LINT_COUNT"].Value.ToString());
  589. if (count < int.Parse(e.Cell.Row.Cells["EDI_COUNT"].Value.ToString()))
  590. {
  591. MessageUtil.ShowTips("可入库支数不能大于总支数与已入库支数之差");
  592. e.Cell.Row.Cells["EDI_COUNT"].Value = count.ToString();
  593. return;
  594. }
  595. DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore.doQueryWt", new object[] { heatNo, matstatus, pipe, e.Cell.Row.Cells["EDI_COUNT"].Value }, ob);
  596. if (dt.Rows.Count == 0)
  597. {
  598. e.Cell.Row.Cells["EDI_WT"].Value = "0";
  599. }
  600. else
  601. {
  602. e.Cell.Row.Cells["EDI_WT"].Value = dt.Rows[0]["ACT_WEIGHT"].ToString();
  603. }
  604. }
  605. }
  606. }
  607. if (e.Cell.Column.Key == "EDI_WT")
  608. {
  609. if (e.Cell.Row.Cells["EDI_WT"].Value == null)
  610. {
  611. e.Cell.Row.Cells["EDI_WT"].Value = "0";
  612. }
  613. else
  614. {
  615. ultraGrid2.UpdateData();
  616. string actWt = e.Cell.Row.Cells["EDI_WT"].Value.ToString();
  617. if (!StringUtil.IsFloat(actWt) || actWt == "0")
  618. {
  619. e.Cell.Row.Cells["EDI_WT"].Value = "0";
  620. }
  621. else
  622. {
  623. double wt = double.Parse(row.Cells["ACT_WEIGHT"].Value.ToString()) - double.Parse(row.Cells["LINT_WT"].Value.ToString());
  624. if (wt < double.Parse(e.Cell.Row.Cells["EDI_WT"].Value.ToString()))
  625. {
  626. MessageUtil.ShowTips("可入库重量不能大于总重量与已入库重量之差");
  627. e.Cell.Row.Cells["EDI_WT"].Value = wt.ToString("f3");
  628. return;
  629. }
  630. }
  631. }
  632. }
  633. //if (e.Cell.Column.Key == "CHK")
  634. //{
  635. // if (Convert.ToBoolean(e.Cell.Value))
  636. // {
  637. // for (int i = 0; i < e.Cell.Row.Cells.Count; i++)
  638. // {
  639. // e.Cell.Row.Cells[i].Activation = Activation.AllowEdit;
  640. // }
  641. // }
  642. //}
  643. }
  644. private void FrmInOnlineStore_Shown(object sender, EventArgs e)
  645. {
  646. if (toolMenu.Toolbars[0].Tools.Exists("DoQueryMat"))
  647. {
  648. toolMenu.Toolbars[0].Tools["DoQueryMat"].InstanceProps.Visible = DefaultableBoolean.False;
  649. }
  650. if (toolMenu.Toolbars[0].Tools.Exists("DoQueryMatB"))
  651. {
  652. toolMenu.Toolbars[0].Tools["DoQueryMatB"].InstanceProps.Visible = DefaultableBoolean.False;
  653. }
  654. if (toolMenu.Toolbars[0].Tools.Exists("DoQueryInList"))
  655. {
  656. toolMenu.Toolbars[0].Tools["DoQueryInList"].InstanceProps.Visible = DefaultableBoolean.False;
  657. }
  658. if (toolMenu.Toolbars[0].Tools.Exists("cancelInList"))
  659. {
  660. toolMenu.Toolbars[0].Tools["cancelInList"].InstanceProps.Visible = DefaultableBoolean.False;
  661. }
  662. if (toolMenu.Toolbars[0].Tools.Exists("DoDecision"))
  663. {
  664. toolMenu.Toolbars[0].Tools["DoDecision"].InstanceProps.Visible = DefaultableBoolean.False;
  665. }
  666. if (toolMenu.Toolbars[0].Tools.Exists("cancelDoDecision"))
  667. {
  668. toolMenu.Toolbars[0].Tools["cancelDoDecision"].InstanceProps.Visible = DefaultableBoolean.False;
  669. }
  670. if (toolMenu.Toolbars[0].Tools.Exists("Print"))
  671. {
  672. toolMenu.Toolbars[0].Tools["Print"].InstanceProps.Visible = DefaultableBoolean.False;
  673. }
  674. if (toolMenu.Toolbars[0].Tools.Exists("insertProssWt"))
  675. {
  676. toolMenu.Toolbars[0].Tools["insertProssWt"].InstanceProps.Visible = DefaultableBoolean.False;
  677. }
  678. }
  679. private void ultraTabControl1_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  680. {
  681. if (toolMenu == null) return;
  682. if (ultraTabControl1.SelectedTab.Key == "1")
  683. {
  684. if (toolMenu.Toolbars[0].Tools.Exists("DoQuery"))
  685. {
  686. toolMenu.Toolbars[0].Tools["DoQuery"].InstanceProps.Visible = DefaultableBoolean.True;
  687. }
  688. if (toolMenu.Toolbars[0].Tools.Exists("DoSave"))
  689. {
  690. toolMenu.Toolbars[0].Tools["DoSave"].InstanceProps.Visible = DefaultableBoolean.True;
  691. }
  692. if (toolMenu.Toolbars[0].Tools.Exists("DoQueryMat"))
  693. {
  694. toolMenu.Toolbars[0].Tools["DoQueryMat"].InstanceProps.Visible = DefaultableBoolean.False;
  695. }
  696. if (toolMenu.Toolbars[0].Tools.Exists("DoQueryMatB"))
  697. {
  698. toolMenu.Toolbars[0].Tools["DoQueryMatB"].InstanceProps.Visible = DefaultableBoolean.False;
  699. }
  700. if (toolMenu.Toolbars[0].Tools.Exists("DoQueryInList"))
  701. {
  702. toolMenu.Toolbars[0].Tools["DoQueryInList"].InstanceProps.Visible = DefaultableBoolean.False;
  703. }
  704. if (toolMenu.Toolbars[0].Tools.Exists("cancelInList"))
  705. {
  706. toolMenu.Toolbars[0].Tools["cancelInList"].InstanceProps.Visible = DefaultableBoolean.False;
  707. }
  708. if (toolMenu.Toolbars[0].Tools.Exists("DoDecision"))
  709. {
  710. toolMenu.Toolbars[0].Tools["DoDecision"].InstanceProps.Visible = DefaultableBoolean.False;
  711. }
  712. if (toolMenu.Toolbars[0].Tools.Exists("DoBeside"))
  713. {
  714. toolMenu.Toolbars[0].Tools["DoBeside"].InstanceProps.Visible = DefaultableBoolean.True;
  715. }
  716. if (toolMenu.Toolbars[0].Tools.Exists("cancelDoBeside"))
  717. {
  718. toolMenu.Toolbars[0].Tools["cancelDoBeside"].InstanceProps.Visible = DefaultableBoolean.True;
  719. }
  720. if (toolMenu.Toolbars[0].Tools.Exists("cancelDoDecision"))
  721. {
  722. toolMenu.Toolbars[0].Tools["cancelDoDecision"].InstanceProps.Visible = DefaultableBoolean.False;
  723. }
  724. if (toolMenu.Toolbars[0].Tools.Exists("Print"))
  725. {
  726. toolMenu.Toolbars[0].Tools["Print"].InstanceProps.Visible = DefaultableBoolean.False;
  727. }
  728. if (toolMenu.Toolbars[0].Tools.Exists("insertProssWt"))
  729. {
  730. toolMenu.Toolbars[0].Tools["insertProssWt"].InstanceProps.Visible = DefaultableBoolean.False;
  731. }
  732. }
  733. else if (ultraTabControl1.SelectedTab.Key == "2")
  734. {
  735. if (toolMenu.Toolbars[0].Tools.Exists("DoQuery"))
  736. {
  737. toolMenu.Toolbars[0].Tools["DoQuery"].InstanceProps.Visible = DefaultableBoolean.False;
  738. }
  739. if (toolMenu.Toolbars[0].Tools.Exists("DoSave"))
  740. {
  741. toolMenu.Toolbars[0].Tools["DoSave"].InstanceProps.Visible = DefaultableBoolean.False;
  742. }
  743. if (toolMenu.Toolbars[0].Tools.Exists("DoQueryMat"))
  744. {
  745. toolMenu.Toolbars[0].Tools["DoQueryMat"].InstanceProps.Visible = DefaultableBoolean.False;
  746. }
  747. if (toolMenu.Toolbars[0].Tools.Exists("DoQueryMatB"))
  748. {
  749. toolMenu.Toolbars[0].Tools["DoQueryMatB"].InstanceProps.Visible = DefaultableBoolean.False;
  750. }
  751. if (toolMenu.Toolbars[0].Tools.Exists("DoQueryInList"))
  752. {
  753. toolMenu.Toolbars[0].Tools["DoQueryInList"].InstanceProps.Visible = DefaultableBoolean.True;
  754. }
  755. if (toolMenu.Toolbars[0].Tools.Exists("cancelInList"))
  756. {
  757. toolMenu.Toolbars[0].Tools["cancelInList"].InstanceProps.Visible = DefaultableBoolean.True;
  758. }
  759. if (toolMenu.Toolbars[0].Tools.Exists("DoDecision"))
  760. {
  761. toolMenu.Toolbars[0].Tools["DoDecision"].InstanceProps.Visible = DefaultableBoolean.True;
  762. }
  763. if (toolMenu.Toolbars[0].Tools.Exists("DoBeside"))
  764. {
  765. toolMenu.Toolbars[0].Tools["DoBeside"].InstanceProps.Visible = DefaultableBoolean.False;
  766. }
  767. if (toolMenu.Toolbars[0].Tools.Exists("cancelDoBeside"))
  768. {
  769. toolMenu.Toolbars[0].Tools["cancelDoBeside"].InstanceProps.Visible = DefaultableBoolean.False;
  770. }
  771. if (toolMenu.Toolbars[0].Tools.Exists("cancelDoDecision"))
  772. {
  773. toolMenu.Toolbars[0].Tools["cancelDoDecision"].InstanceProps.Visible = DefaultableBoolean.True;
  774. }
  775. if (toolMenu.Toolbars[0].Tools.Exists("Print"))
  776. {
  777. toolMenu.Toolbars[0].Tools["Print"].InstanceProps.Visible = DefaultableBoolean.False;
  778. }
  779. if (toolMenu.Toolbars[0].Tools.Exists("insertProssWt"))
  780. {
  781. toolMenu.Toolbars[0].Tools["insertProssWt"].InstanceProps.Visible = DefaultableBoolean.False;
  782. }
  783. }
  784. }
  785. private void chkTim_CheckedChanged(object sender, EventArgs e)
  786. {
  787. this.StartTime.Enabled = this.EndTime.Enabled = this.chkTim.Checked;
  788. }
  789. private void chkJugeHeatNo_CheckedChanged(object sender, EventArgs e)
  790. {
  791. this.txtJugeNo.Enabled = this.chkJugeHeatNo.Checked;
  792. }
  793. private void chkLotNo_CheckedChanged(object sender, EventArgs e)
  794. {
  795. this.txtLotNo.Enabled = this.chkLotNo.Checked;
  796. }
  797. private void chkTim1_CheckedChanged(object sender, EventArgs e)
  798. {
  799. this.StartTime1.Enabled = this.EndTime1.Enabled = this.chkTim1.Checked;
  800. }
  801. private void chkHeatNo1_CheckedChanged(object sender, EventArgs e)
  802. {
  803. this.txtHeatNo1.Enabled = this.chkHeatNo1.Checked;
  804. }
  805. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  806. {
  807. UltraGridRow row = ultraGrid1.ActiveRow;
  808. if (row == null) return;
  809. string heatNo = row.Cells["HEAT_PLAN_NO"].Value.ToString();
  810. string judge = row.Cells["JUDGE_STOVE_NO"].Value.ToString();
  811. string batch = row.Cells["BATCH_NO"].Value.ToString();
  812. string groupNo = row.Cells["BATCH_GROUD_NO"].Value.ToString();
  813. DataTable dt1 = ServerHelper.GetData("com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore.doQuerySingleJug", new object[] { heatNo, judge, batch, groupNo }, ob);
  814. GridHelper.CopyDataToDatatable(ref dt1, ref dataTable7, true);
  815. QueryPortVrp(heatNo);
  816. foreach (UltraGridRow urg in ultraGrid3.Rows)
  817. {
  818. if (urg.Cells["MAT_STATUS"].Text.Equals("剔除"))
  819. {
  820. urg.Cells["MAT_STATUS"].Appearance.ForeColor = Color.Red;
  821. }
  822. }
  823. }
  824. //查询管号队列
  825. private void QueryPortVrp(string planNo)
  826. {
  827. //查询管号队列
  828. DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryDbkPortVrphot", new object[] { planNo }, this.ob);
  829. GridHelper.CopyDataToDatatable(ref dt, ref dataTable3, true);
  830. foreach (UltraGridRow urg in ultraGrid6.Rows)
  831. {
  832. if (urg.Cells["MAT_STATUS"].Text.Equals("剔除"))
  833. {
  834. urg.Cells["MAT_STATUS"].Appearance.ForeColor = Color.Red;
  835. }
  836. }
  837. }
  838. private void craftImg_EditorButtonClick(object sender, EditorButtonEventArgs e)
  839. {
  840. UltraGridRow row = ultraGrid1.ActiveRow;
  841. string craftPath = YdmBaseClass.getQueryCraftNoRCL(row.Cells["CRAFT_FILE_NO"].Text.ToString(), row.Cells["CRAFT_SEQ"].Text.ToString(), ob);
  842. if (e.Button.Key.ToLower().Equals("select"))
  843. {
  844. FormFileDown down = new FormFileDown(ob, craftPath);
  845. down.CtrlFileDown1.Button3.Visible = false;
  846. down.ShowDialog();
  847. }
  848. }
  849. private void cmbBz_ValueChanged(object sender, EventArgs e)
  850. {
  851. //获取产线名称
  852. string plinename = "";
  853. DataTable dtc = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryplinename", new object[] { plineCode }, this.ob);
  854. if (dtc.Rows.Count > 0)
  855. {
  856. plinename = dtc.Rows[0]["PLINE_NAME"].ToString();
  857. }
  858. //获取操作人
  859. string banCi = "";
  860. if (cmbBz.Value == "1")
  861. {
  862. banCi = "甲";
  863. }
  864. else if (cmbBz.Value == "2")
  865. {
  866. banCi = "乙";
  867. }
  868. else if (cmbBz.Value == "3")
  869. {
  870. banCi = "丙";
  871. }
  872. else if (cmbBz.Value == "4")
  873. {
  874. banCi = "丁";
  875. }
  876. DataTable dtt = ServerHelper.GetData("com.steering.mes.mcp.Mch.FrmMcpLoading.getPerson", new object[] { banCi, plinename }, this.ob);//如果是“”里面添加的是条件
  877. name.DataSource = dtt;
  878. name.DisplayMember = "NAME";
  879. // name.ValueMember = "ID";
  880. YdmBaseClass.SetComboItemHeight(name);
  881. }
  882. private void OfflineNum_EditorButtonClick(object sender, EditorButtonEventArgs e)
  883. {
  884. UltraGridRow row = ultraGrid1.ActiveRow;
  885. if (row == null) return;
  886. UltraGridRow uRow3 = ultraGrid3.ActiveRow;
  887. if (uRow3 == null) return;
  888. UltraGridRow urg = ultraGrid2.ActiveRow;
  889. if (urg == null) return;
  890. string matStart = "";//材料状态
  891. string isSamp = "";//是否样管
  892. if (uRow3.Cells["MAT_STATUS"].Value.ToString().Equals("剔除"))
  893. {
  894. matStart = "10";
  895. isSamp = "0";
  896. }
  897. else if (uRow3.Cells["MAT_STATUS"].Value.ToString().Equals("合格"))
  898. {
  899. matStart = "00";
  900. isSamp = "0";
  901. }
  902. else
  903. {
  904. matStart = "00";
  905. isSamp = "1";
  906. }
  907. string batchgroudno = row.Cells["BATCH_GROUD_NO"].Text.ToString();
  908. string outnumcut = row.Cells["OUTNUM_CUT"].Text.ToString();
  909. string heno = row.Cells["HEAT_PLAN_NO"].Text.ToString();
  910. string linenum = urg.Cells["EDI_COUNT"].Text.ToString();
  911. string plineName = row.Cells["PLINE_NAME"].Text.ToString();
  912. DataTable dt1 = ServerHelper.GetData("com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore.getQueryExpandResultStuts", new object[] { heno, row.Cells["PLINE_CODE"].Text.ToString() }, this.ob);
  913. if (dt1.Rows.Count > 0)
  914. {
  915. if (dt1.Rows[0]["INSTORE_FLAG"].ToString() == "1")
  916. {
  917. MessageUtil.ShowTips("该工序已经结炉,不允许录入离线数!");
  918. return;
  919. }
  920. }
  921. if(linenum==null||linenum=="")
  922. {
  923. linenum = "0";
  924. }
  925. UltraGridRow row3 = ultraGrid6.ActiveRow;
  926. if (row3 == null) return;
  927. HttScrapNumOnline matfrm = new HttScrapNumOnline(heno, SlGx, SlGxname, batchgroudno, outnumcut, stono, plineCode, linenum, plineName,matStart,isSamp, this.ob);
  928. matfrm.ShowDialog();
  929. this.ultraGrid1.UpdateData();
  930. QuerySinglePlan();
  931. }
  932. private void ultraGrid5_AfterRowActivate(object sender, EventArgs e)
  933. {
  934. UltraGridRow urgs = ultraGrid5.ActiveRow;
  935. string heastno = urgs.Cells["HEAT_PLAN_NO"].Value.ToString();
  936. DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.heatTreatment.FrmHttInOnlineStore.doQuerySingleJugStove", new object[] { heastno }, this.ob);
  937. GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);
  938. if (dt.Rows.Count <= 0)
  939. {
  940. DataTable dt1 = new DataTable();
  941. GridHelper.CopyDataToDatatable(ref dt1, ref dataTable8, true);
  942. GridHelper.CopyDataToDatatable(ref dt1, ref dataTable7, true);
  943. GridHelper.CopyDataToDatatable(ref dt1, ref dataTable1, true);
  944. }
  945. foreach (UltraGridRow urg in ultraGrid1.Rows)
  946. {
  947. if (urg.Cells["PLANSTATUS"].Text.Equals("生产中"))
  948. {
  949. urg.Cells["PLANSTATUS"].Appearance.BackColor = Color.Green;
  950. }
  951. if (urg.Cells["PLANSTATUS"].Text.Equals("生产完成"))
  952. {
  953. urg.Cells["PLANSTATUS"].Appearance.BackColor = Color.Red;
  954. }
  955. if (urg.Cells["PLANSTATUS"].Text.Equals("关闭"))
  956. {
  957. urg.Cells["PLANSTATUS"].Appearance.BackColor = Color.Red;
  958. }
  959. if (urg.Cells["BESIDE_STATUS"].Text.Equals("交库结炉"))
  960. {
  961. urg.Cells["BESIDE_STATUS"].Appearance.BackColor = Color.LightGray;
  962. }
  963. }
  964. if (dt.Rows.Count > 0)
  965. {
  966. for (int i = 0; i < ultraGrid1.Rows.Count; i++)
  967. {
  968. if (ultraGrid1.Rows[i].Cells["HEAT_PLAN_NO"].Value.ToString() == dingwei)
  969. {
  970. UltraGridRow row = ultraGrid1.Rows[i];
  971. row.Activate();
  972. }
  973. }
  974. }
  975. dingwei = "";
  976. }
  977. }
  978. }