FrmZEROBaseInfo.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using CoreFS.CA06;
  9. using Core.Mes.Client.Common;
  10. using System.Collections;
  11. namespace Core.LgMes.Client.LgDeviceManager
  12. {
  13. public partial class FrmZEROBaseInfo : Core.Mes.Client.Common.frmStyleBase
  14. {
  15. bool bOK = false; //是否响应段位号选择改变事件
  16. public string strNo = "", strCCM = "",strVBNo="";
  17. public FrmZEROBaseInfo(OpeBase oba)
  18. {
  19. InitializeComponent();
  20. ob = oba;
  21. }
  22. private void txtAge_KeyPress(object sender, KeyPressEventArgs e)
  23. {
  24. if (!(Char.IsNumber(e.KeyChar) || e.KeyChar == '\b' || e.KeyChar == '.') || (((TextBox)(sender)).Text.Trim().Contains(".") && e.KeyChar == '.'))
  25. {
  26. e.Handled = true;
  27. }
  28. }
  29. private void FrmCLBaseInfoBP_Load(object sender, EventArgs e)
  30. {
  31. if (strCCM.Length > 0)
  32. {
  33. cmbCCM.Text = strCCM;
  34. //cmbVBType.Text = strVBNo;
  35. this.cbbCCM_SelectedIndexChanged(this, null);
  36. if (strNo.Length > 0)
  37. {
  38. cmbID.Text = strNo;
  39. bOK = true;
  40. this.cbbID_SelectedIndexChanged(this, null);
  41. }
  42. }
  43. else
  44. bOK = true;
  45. }
  46. private void proc_GetID(string strCCM)
  47. {
  48. try
  49. {
  50. if (strCCM.Length == 0)
  51. return;
  52. string strErr = "";
  53. ArrayList arry = new ArrayList();
  54. arry.Add("ZOCRYSTALLIZERID.select");
  55. arry.Add(strCCM);
  56. CommonClientToServer ccs = new CommonClientToServer();
  57. ccs.ob = this.ob;
  58. DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
  59. if (strErr != "" || !(ds != null && ds.Tables.Count > 0))
  60. {
  61. MessageBox.Show("段位号加载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  62. if (MessageBox.Show("是否重新加载结段位号?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
  63. proc_GetID(strCCM);
  64. return;
  65. }
  66. cmbID.DataSource = ds.Tables[0];
  67. cmbID.DisplayMember = "CRYSTALLIZERID";
  68. if (ds.Tables[0].Rows.Count == 0)
  69. proc_ResetControl();
  70. }
  71. catch (Exception ex)
  72. {
  73. MessageBox.Show(ex.Message);
  74. }
  75. }
  76. private void proc_ResetControl()
  77. {
  78. try
  79. {
  80. cmbID.Text = "";
  81. txtCS.Clear();
  82. txtTgl.Clear();
  83. txtCS1.Clear();
  84. txtCS2.Clear();
  85. txtCS3.Clear();
  86. txtCS4.Clear();
  87. cmbID5.SelectedIndex = -1;
  88. txtCS5.Clear();
  89. cmbID6.SelectedIndex = -1;
  90. txtCS6.Clear();
  91. txtStatus.Clear();
  92. txtPos.Clear();
  93. udtePTime.DateTime = DateTime.Now;
  94. udteBuyTime.DateTime = DateTime.Now;
  95. txtMemo.Clear();
  96. }
  97. catch (Exception ex)
  98. {
  99. MessageBox.Show(ex.Message);
  100. }
  101. }
  102. /// <summary>
  103. /// 段位基本信息增加
  104. /// </summary>
  105. private void proc_Add()
  106. {
  107. try
  108. {
  109. string strCcm = cmbCCM.Text.Trim();
  110. string strID = cmbID.Text.Trim();
  111. string strType = "零段";
  112. if (strCcm.Length == 0)
  113. {
  114. MessageBox.Show("请选择铸机号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  115. cmbCCM.Focus();
  116. return;
  117. }
  118. if (strID.Length == 0)
  119. {
  120. MessageBox.Show("请输入编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  121. cmbID.Focus();
  122. return;
  123. }
  124. string strErr = "";
  125. ArrayList arry = new ArrayList();
  126. arry.Add("FrmZOBaseInfoBP");
  127. arry.Add(strCcm);
  128. arry.Add(strID);
  129. CommonClientToServer ccs = new CommonClientToServer();
  130. ccs.ob = this.ob;
  131. DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
  132. "doSimpleQuery", arry, out strErr);
  133. int iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
  134. if (iCnt > 0)
  135. {
  136. MessageBox.Show("[" + strCCM + "]已存在" + strType + "[" + strID + "],不能重复录入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  137. cmbID.Focus();
  138. return;
  139. }
  140. string strReturn = "";
  141. strErr = "";
  142. arry.Clear();
  143. #region//修改段位铜板水箱信息
  144. CommonClientToServer cctos = new CommonClientToServer();
  145. #endregion
  146. strErr = "";
  147. arry.Clear();
  148. strReturn = "";
  149. arry.Add("FrmZOBaseInfoBP.ADD");
  150. arry.Add(strID);
  151. arry.Add("3");
  152. arry.Add(txtCS.Text.Trim() == "" ? "0" : txtCS.Text.Trim());
  153. arry.Add(txtTgl.Text.Trim() == "" ? "0" : txtTgl.Text.Trim());
  154. arry.Add(udtePTime.DateTime.ToString("yyyy-MM-dd"));
  155. arry.Add(udteBuyTime.DateTime.ToString("yyyy-MM-dd"));
  156. arry.Add(txtMemo.Text.Trim());
  157. arry.Add(strCcm);
  158. arry.Add("");
  159. arry.Add("");
  160. arry.Add("");
  161. arry.Add("");
  162. arry.Add("");
  163. arry.Add("");
  164. arry.Add(txtOutAge.Text.Trim());
  165. arry.Add(txtInnerAge.Text.Trim());
  166. arry.Add(txtLeftAge.Text.Trim());
  167. arry.Add(txtRightAge.Text.Trim());
  168. //添加铜板对应使用炉数
  169. arry.Add(txtCS1.Text.Trim());
  170. arry.Add(txtCS2.Text.Trim());
  171. arry.Add(txtCS3.Text.Trim());
  172. arry.Add(txtCS4.Text.Trim());
  173. strReturn = ccs.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr);
  174. if (!(strErr == null || strErr == ""))
  175. {
  176. MessageBox.Show("新增[" + strCcm + "]" + strType + "[" + strID + "]失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  177. return;
  178. }
  179. FrmZEROManage frm = (FrmZEROManage)this.Tag;
  180. frm.proc_GetBaseInfo(strCcm, strID);
  181. proc_GetID(strCcm);
  182. MessageBox.Show("新增[" + strCcm + "]" + strType + "[" + strID + "]成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  183. return;
  184. }
  185. catch (Exception ex)
  186. {
  187. MessageBox.Show(ex.Message);
  188. }
  189. }
  190. /// <summary>
  191. /// 段位基本信息修改
  192. /// </summary>
  193. private void proc_Edit()
  194. {
  195. try
  196. {
  197. if (cmbID.Items.Count == 0)
  198. return;
  199. string strCcm = cmbCCM.Text.Trim();
  200. string strID = cmbID.Text.Trim();
  201. string strType = "零段为";
  202. if (strID.Length == 0)
  203. {
  204. MessageBox.Show("请选择需要修改的段位编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  205. cmbID.Focus();
  206. return;
  207. }
  208. #region
  209. #endregion
  210. if (MessageBox.Show("确定要修改[" + strCcm + "]" + strType + "[" + strID + "]信息吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  211. return;
  212. string strErr = "";
  213. string strReturn = "";
  214. ArrayList arry = new ArrayList();
  215. arry.Add("FrmZOBaseInfoBP_Edit.select");
  216. arry.Add(strCcm);
  217. arry.Add(strID);
  218. CommonClientToServer ccs = new CommonClientToServer();
  219. ccs.ob = this.ob;
  220. DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
  221. if (strErr != "" || !(ds != null && ds.Tables.Count > 0))
  222. {
  223. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]信息修改失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  224. return;
  225. }
  226. string str1 = "", str2 = "", str3 = "", str4 = "";
  227. string str5 = "", str6 = "", str7 = "";
  228. if (ds.Tables[0].Rows.Count > 0)
  229. {
  230. str1 = Convert.ToString(ds.Tables[0].Rows[0]["NOWSTATUS"]);
  231. str2 = Convert.ToString(ds.Tables[0].Rows[0]["OUTERCOPPER"]);
  232. str3 = Convert.ToString(ds.Tables[0].Rows[0]["INNERCOPPER"]);
  233. str4 = Convert.ToString(ds.Tables[0].Rows[0]["LEFTCOPPER"]);
  234. str5 = Convert.ToString(ds.Tables[0].Rows[0]["RIGHTCOPPER"]);
  235. str6 = Convert.ToString(ds.Tables[0].Rows[0]["OUTERWATER"]);
  236. str7 = Convert.ToString(ds.Tables[0].Rows[0]["INNERWATER"]);
  237. }
  238. strErr = "";
  239. #region//修改段位铜板水箱信息
  240. CommonClientToServer cctos = new CommonClientToServer();
  241. cctos.ob = this.ob;
  242. #endregion//修改段位铜板水箱信息
  243. //根据流号获取段位编号和周期编号
  244. ArrayList arryCry = new ArrayList();
  245. arryCry.Add("FrmZOCryByCcmsId.Query");
  246. arryCry.Add(txtPos.Text.Trim());
  247. DataSet dsCry = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arryCry, out strErr);
  248. strErr = "";
  249. arry.Clear();
  250. cctos.ob = this.ob;
  251. arry.Add("FrmZOBaseInfoBP.Edit");
  252. arry.Add("3");
  253. arry.Add(strCcm);
  254. arry.Add(txtCS.Text.Trim() == "" ? "0" : txtCS.Text.Trim());
  255. arry.Add(txtTgl.Text.Trim() == "" ? "0" : txtTgl.Text.Trim());
  256. arry.Add(txtOutAge.Text.Trim() == "" ? "0" : txtOutAge.Text.Trim());
  257. arry.Add(txtInnerAge.Text.Trim() == "" ? "0" : txtInnerAge.Text.Trim());
  258. arry.Add(txtLeftAge.Text.Trim() == "" ? "0" : txtLeftAge.Text.Trim());
  259. arry.Add(txtRightAge.Text.Trim() == "" ? "0" : txtRightAge.Text.Trim());
  260. arry.Add(txtCS1.Text.Trim() == "" ? "0" : txtCS1.Text.Trim());
  261. arry.Add(txtCS2.Text.Trim() == "" ? "0" : txtCS2.Text.Trim());
  262. arry.Add(txtCS3.Text.Trim() == "" ? "0" : txtCS3.Text.Trim());
  263. arry.Add(txtCS4.Text.Trim() == "" ? "0" : txtCS4.Text.Trim());
  264. arry.Add("");
  265. arry.Add("");
  266. arry.Add("");
  267. arry.Add("");
  268. arry.Add("");
  269. arry.Add("");
  270. arry.Add(udtePTime.DateTime.ToString("yyyy-MM-dd"));
  271. arry.Add(udteBuyTime.DateTime.ToString("yyyy-MM-dd"));
  272. arry.Add(txtMemo.Text.Trim());
  273. arry.Add(strCCM);
  274. arry.Add(strID);
  275. strReturn = cctos.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr);
  276. //修改段位使用信息
  277. ArrayList arryU = new ArrayList();
  278. arryU.Add("FrmZO_User_Detail.Edit");
  279. arryU.Add(txtCS1.Text.Trim() == "" ? "0" : txtCS1.Text.Trim());
  280. arryU.Add(txtCS2.Text.Trim() == "" ? "0" : txtCS2.Text.Trim());
  281. arryU.Add(txtCS3.Text.Trim() == "" ? "0" : txtCS3.Text.Trim());
  282. arryU.Add(txtCS4.Text.Trim() == "" ? "0" : txtCS4.Text.Trim());
  283. arryU.Add(txtOutAge.Text.Trim() == "" ? "0" : txtOutAge.Text.Trim());
  284. arryU.Add(txtInnerAge.Text.Trim() == "" ? "0" : txtInnerAge.Text.Trim());
  285. arryU.Add(txtLeftAge.Text.Trim() == "" ? "0" : txtLeftAge.Text.Trim());
  286. arryU.Add(txtRightAge.Text.Trim() == "" ? "0" : txtRightAge.Text.Trim());
  287. arryU.Add("3");
  288. arryU.Add(dsCry.Tables[0].Rows.Count>0 ? dsCry.Tables[0].Rows[0]["CRYSTALLIZERID"].ToString():"");
  289. arryU.Add(dsCry.Tables[0].Rows.Count > 0 ? dsCry.Tables[0].Rows[0]["CYCID"].ToString() : "");
  290. strReturn = cctos.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arryU, out strErr);
  291. if (!(strErr == null || strErr == ""))
  292. {
  293. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]信息修改失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  294. return;
  295. }
  296. FrmZEROManage frm = (FrmZEROManage)this.Tag;
  297. frm.proc_GetBaseInfo(strCcm, strID);
  298. proc_GetID(strCcm);
  299. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]信息修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  300. return;
  301. }
  302. catch (Exception ex)
  303. {
  304. MessageBox.Show(ex.Message);
  305. }
  306. }
  307. /// <summary>
  308. /// 段位基础信息删除
  309. /// </summary>
  310. private void proc_Del()
  311. {
  312. try
  313. {
  314. if (cmbID.Items.Count == 0)
  315. return;
  316. string strCcm = cmbCCM.Text.Trim();
  317. string strID = cmbID.Text.Trim();
  318. string strType = "3";
  319. if (strID.Length == 0)
  320. {
  321. MessageBox.Show("请选择需要删除的" + strType + "编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  322. cmbID.Focus();
  323. return;
  324. }
  325. if (MessageBox.Show("确定要删除[" + strCcm + "]" + strType + "[" + strID + "]的信息吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  326. return;
  327. string strErr = "";
  328. ArrayList arry = new ArrayList();
  329. arry.Add("FrmZOBaseInfoBP_Del_Select");
  330. arry.Add(strCcm);
  331. arry.Add(strID);
  332. CommonClientToServer ccs = new CommonClientToServer();
  333. ccs.ob = this.ob;
  334. DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
  335. if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0))
  336. {
  337. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]信息删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  338. return;
  339. }
  340. int iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
  341. if (iCnt == 0)
  342. {
  343. MessageBox.Show("[" + strCcm + "]不存在" + strType + "[" + strID + "]信息,无法删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  344. cmbID.Focus();
  345. return;
  346. }
  347. iCnt = 0;
  348. ds = null;
  349. strErr = "";
  350. arry.Clear();
  351. ccs.ob = this.ob;
  352. arry.Add("FrmZOBaseInfoBP_Del_Select_1");
  353. arry.Add(strCcm);
  354. arry.Add(strID);
  355. ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
  356. if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0))
  357. {
  358. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]信息删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  359. return;
  360. }
  361. iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
  362. if (iCnt > 0)
  363. {
  364. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]存在使用记录,不能删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  365. cmbID.Focus();
  366. return;
  367. }
  368. iCnt = 0;
  369. ds = null;
  370. strErr = "";
  371. arry.Clear();
  372. ccs.ob = this.ob;
  373. arry.Add("FrmZOBaseInfoBP_Del_Select_2");
  374. arry.Add(strCcm);
  375. arry.Add(strID);
  376. ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
  377. if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0))
  378. {
  379. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]信息删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  380. return;
  381. }
  382. iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
  383. if (iCnt > 0)
  384. {
  385. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]存在维修记录,不能删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  386. cmbID.Focus();
  387. return;
  388. }
  389. strErr = "";
  390. arry.Clear();
  391. arry.Add("FrmZOBaseInfoBP_Del.Delect");
  392. arry.Add(strCcm);
  393. arry.Add(strID);
  394. string strReturn = ccs.NoQueryFunctions("Core.LgMes.Server.Common.ComDBSave", "doSimpleSave", arry, out strErr);
  395. if (!(strErr == null || strErr == ""))
  396. {
  397. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]信息删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  398. return;
  399. }
  400. FrmVBManage frm = (FrmVBManage)this.Tag;
  401. frm.proc_GetBaseInfo(strCcm, "");
  402. proc_GetID(strCcm);
  403. MessageBox.Show("[" + strCcm + "]" + strType + "[" + strID + "]信息删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  404. return;
  405. }
  406. catch (Exception ex)
  407. {
  408. MessageBox.Show(ex.Message);
  409. }
  410. }
  411. private TextBox proc_GetTextBox(string strComboBoxName)
  412. {
  413. switch (strComboBoxName)
  414. {
  415. case "cbbID1":
  416. {
  417. return txtCS1;
  418. }
  419. case "cbbID2":
  420. {
  421. return txtCS2;
  422. }
  423. case "cbbID3":
  424. {
  425. return txtCS3;
  426. }
  427. case "cbbID4":
  428. {
  429. return txtCS4;
  430. }
  431. case "cbbID5":
  432. {
  433. return txtCS5;
  434. }
  435. case "cbbID6":
  436. {
  437. return txtCS6;
  438. }
  439. }
  440. return null;
  441. }
  442. private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
  443. {
  444. switch (e.ClickedItem.Name)
  445. {
  446. case "ADD":
  447. {
  448. this.proc_Add();
  449. break;
  450. }
  451. case "EDIT":
  452. {
  453. this.proc_Edit();
  454. break;
  455. }
  456. case "DEL":
  457. {
  458. this.proc_Del();
  459. break;
  460. }
  461. case "CLOSE":
  462. {
  463. this.Close();
  464. break;
  465. }
  466. default:
  467. break;
  468. }
  469. }
  470. /// <铸机号属性更改时>
  471. /// 铸机号属性更改时
  472. /// </summary>
  473. /// <param name="sender"></param>
  474. /// <param name="e"></param>
  475. private void cbbCCM_SelectedIndexChanged(object sender, EventArgs e)
  476. {
  477. if (cmbCCM.Text.Length > 0)
  478. {
  479. proc_GetID(cmbCCM.Text);
  480. }
  481. }
  482. /// <段位属性更改时>
  483. /// 段位属性更改时
  484. /// </summary>
  485. /// <param name="sender"></param>
  486. /// <param name="e"></param>
  487. private void cbbID_SelectedIndexChanged(object sender, EventArgs e)
  488. {
  489. try
  490. {
  491. if (!bOK)
  492. return;
  493. string strCCM = cmbCCM.Text.Trim();
  494. string strID = cmbID.Text.Trim();
  495. string strType = "3";
  496. if (strID.Length == 0)
  497. return;
  498. string strErr = "";
  499. ArrayList arry = new ArrayList();
  500. arry.Add("ZOcbbID.Select");
  501. arry.Add(strID);
  502. arry.Add(strCCM);
  503. CommonClientToServer ccs = new CommonClientToServer();
  504. ccs.ob = this.ob;
  505. DataSet ds = ccs.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery", "doSimpleQuery", arry, out strErr);
  506. if (strErr != "" || !(ds != null && ds.Tables.Count > 0))
  507. {
  508. MessageBox.Show("" + strType + "[" + strID + "]信息查询失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  509. return;
  510. }
  511. if (ds.Tables[0].Rows.Count == 0) return;
  512. //cmbVBType.Text = Convert.ToString(ds.Tables[0].Rows[0]["TYPE"]);
  513. txtCS.Text = Convert.ToString(ds.Tables[0].Rows[0]["CUPRUMCANALTIME"]);
  514. txtTgl.Text = Convert.ToString(ds.Tables[0].Rows[0]["AGE"]);
  515. txtStatus.Text = Convert.ToString(ds.Tables[0].Rows[0]["NOWSTATUS"]);
  516. txtPos.Text = Convert.ToString(ds.Tables[0].Rows[0]["CCM_S_ID"]);
  517. udtePTime.DateTime = Convert.ToDateTime(ds.Tables[0].Rows[0]["CREATIVEDATE"]);
  518. udteBuyTime.DateTime = Convert.ToDateTime(ds.Tables[0].Rows[0]["BUYDATE"]);
  519. txtMemo.Text = Convert.ToString(ds.Tables[0].Rows[0]["MEMO"]);
  520. txtOutAge.Text = Convert.ToString(ds.Tables[0].Rows[0]["OUTAGE"]);
  521. txtInnerAge.Text = Convert.ToString(ds.Tables[0].Rows[0]["INNERAGE"]);
  522. txtLeftAge.Text = Convert.ToString(ds.Tables[0].Rows[0]["LEFTAGE"]);
  523. txtRightAge.Text = Convert.ToString(ds.Tables[0].Rows[0]["RIGHTAGE"]);
  524. txtCS1.Text = Convert.ToString(ds.Tables[0].Rows[0]["OUTTIMES"]);
  525. txtCS2.Text = Convert.ToString(ds.Tables[0].Rows[0]["INNERTIMES"]);
  526. txtCS3.Text = Convert.ToString(ds.Tables[0].Rows[0]["LEFTTIMES"]);
  527. txtCS4.Text = Convert.ToString(ds.Tables[0].Rows[0]["RIGHTTIMES"]);
  528. }
  529. catch { }
  530. }
  531. }
  532. }