FrmCLBaseInfo.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  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. namespace Core.LgMes.Client.LgDeviceManager
  11. {
  12. public partial class FrmCLBaseInfo : frmModelFormStyle
  13. {
  14. bool bOK = false; //是否响应结晶器号选择改变事件
  15. public string strNo = "", strCCM = "";
  16. OpeBase ob = null;
  17. public FrmCLBaseInfo(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 FrmCLBaseInfo_Load(object sender, EventArgs e)
  30. {
  31. if (strCCM.Length > 0)
  32. {
  33. ucmbCCM.Text = strCCM;
  34. this.cbbCCM_SelectedIndexChanged(this, null);
  35. if (strNo.Length > 0)
  36. {
  37. ucmbID.Text = strNo;
  38. bOK = true;
  39. this.cbbID_SelectedIndexChanged(this, null);
  40. }
  41. }
  42. else
  43. bOK = true;
  44. }
  45. private void proc_GetID(string strCCM)
  46. {
  47. try
  48. {
  49. if (strCCM.Length == 0)
  50. return;
  51. string strErr = "";
  52. string strSql = "select CRYSTALLIZERID from DEV_JJQ_BASE_INFO where CCM_ID = '" + strCCM + "' order by length(CRYSTALLIZERID), CRYSTALLIZERID";
  53. CoreClientParam ccp = new CoreClientParam();
  54. ccp.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  55. ccp.MethodName = "QueryMethods";
  56. ccp.ServerParams = new Object[] { strSql };
  57. DataTable dt = new DataTable();
  58. ccp.SourceDataTable = dt;
  59. ob.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  60. DataSet ds = new DataSet();
  61. ds.Tables.Add(dt);
  62. if (strErr != "" || !(ds != null && ds.Tables.Count > 0))
  63. {
  64. MessageBox.Show("结晶器号加载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  65. if (MessageBox.Show("是否重新加载结晶器号?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
  66. proc_GetID(strCCM);
  67. return;
  68. }
  69. ucmbID.Items.Clear();
  70. for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
  71. {
  72. ucmbID.Items.Add(ds.Tables[0].Rows[i][0]);
  73. }
  74. if (ds.Tables[0].Rows.Count == 0)
  75. proc_ResetControl();
  76. }
  77. catch (Exception ex)
  78. {
  79. MessageBox.Show(ex.Message);
  80. }
  81. }
  82. private void proc_ResetControl()
  83. {
  84. try
  85. {
  86. ucmbID.Text = "";
  87. txtType.Clear();
  88. txtTgl.Clear();
  89. txtTGBH.Clear();
  90. txtTbcs.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 = ucmbCCM.Text.Trim();
  110. string strID = ucmbID.Text.Trim();
  111. if (strCcm.Length == 0)
  112. {
  113. MessageBox.Show("请选择铸机号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  114. ucmbCCM.Focus();
  115. return;
  116. }
  117. if (strID.Length == 0)
  118. {
  119. MessageBox.Show("请输入结晶器编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  120. ucmbID.Focus();
  121. return;
  122. }
  123. string strType = "2"; //方坯结晶器
  124. string strErr = "";
  125. string strSql = "select count(1) from DEV_JJQ_BASE_INFO where CCM_ID = '" + strCcm + "' and CRYSTALLIZERID = '" + strID + "'";
  126. CoreClientParam ccp = new CoreClientParam();
  127. ccp.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  128. ccp.MethodName = "QueryMethods";
  129. ccp.ServerParams = new Object[] { strSql };
  130. DataTable dt = new DataTable();
  131. ccp.SourceDataTable = dt;
  132. ob.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  133. DataSet ds = new DataSet();
  134. ds.Tables.Add(dt);
  135. if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0))
  136. {
  137. MessageBox.Show("新增[" + strCcm + "]结晶器[" + strID + "]失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  138. return;
  139. }
  140. int iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
  141. if (iCnt > 0)
  142. {
  143. MessageBox.Show("[" + strCcm + "]已存在结晶器[" + strID + "],不能重复录入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  144. ucmbID.Focus();
  145. return;
  146. }
  147. strErr = "";
  148. string Sql = "insert into DEV_JJQ_BASE_INFO "
  149. + "(CRYSTALLIZERID, OUTERCOPPER, NOWSTATUS, TYPE, AGE, CUPRUMCANALTIME, CREATIVEDATE, BUYDATE, MEMO, CCM_ID, ID) "
  150. + "values "
  151. + "('" + strID + "',"
  152. + "'" + txtTGBH.Text.Trim() + "',"
  153. + "'3',"
  154. + "'" + strType + "',"
  155. + "'" + (txtTgl.Text.Trim() == "" ? "0" : txtTgl.Text.Trim()) + "',"
  156. + "'" + (txtTbcs.Text.Trim() == "" ? "0" : txtTbcs.Text.Trim()) + "',"
  157. + "to_date('" + udtePTime.DateTime.ToString("yyyy-MM-dd") + "','yyyy-MM-dd'),"
  158. + "to_date('" + udteBuyTime.DateTime.ToString("yyyy-MM-dd") + "','yyyy-MM-dd'),"
  159. + "'" + txtMemo.Text.Trim() + "',"
  160. + "'" + strCcm + "',"
  161. + "(select nvl(max(ID),0)+1 from DEV_JJQ_BASE_INFO))";
  162. CoreClientParam ccp_add = new CoreClientParam();
  163. ccp_add.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  164. ccp_add.MethodName = "UpdateMethods";
  165. ccp_add.ServerParams = new Object[] { Sql };
  166. ob.ExecuteNonQuery(ccp_add, CoreInvokeType.Internal);
  167. if (!(strErr == null || strErr == ""))
  168. {
  169. MessageBox.Show("新增[" + strCcm + "]结晶器[" + strID + "]失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  170. return;
  171. }
  172. FrmCrystallizerManage frm = (FrmCrystallizerManage)this.Tag;
  173. frm.proc_GetBaseInfo(strCcm, strID);
  174. proc_GetID(strCcm);
  175. MessageBox.Show("新增[" + strCcm + "]结晶器[" + strID + "]成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  176. return;
  177. }
  178. catch (Exception ex)
  179. {
  180. MessageBox.Show(ex.Message);
  181. }
  182. }
  183. /// <summary>
  184. /// 基本信息修改
  185. /// </summary>
  186. private void proc_Edit()
  187. {
  188. try
  189. {
  190. if (ucmbID.Items.Count == 0)
  191. return;
  192. string strCcm = ucmbCCM.Text.Trim();
  193. string strID = ucmbID.Text.Trim();
  194. if (strID.Length == 0)
  195. {
  196. MessageBox.Show("请选择需要修改的结晶器编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  197. ucmbID.Focus();
  198. return;
  199. }
  200. string strType = "2"; //方坯结晶器
  201. if (MessageBox.Show("确定要修改[" + strCcm + "]的结晶器[" + strID + "]信息吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  202. return;
  203. string strErr = "";
  204. string strSql = "select count(1) from DEV_JJQ_BASE_INFO where CCM_ID = '" + strCcm + "' and CRYSTALLIZERID = '" + strID + "'";
  205. CoreClientParam ccp = new CoreClientParam();
  206. ccp.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  207. ccp.MethodName = "QueryMethods";
  208. ccp.ServerParams = new Object[] { strSql };
  209. DataTable dt = new DataTable();
  210. ccp.SourceDataTable = dt;
  211. ob.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  212. DataSet ds = new DataSet();
  213. ds.Tables.Add(dt);
  214. if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0))
  215. {
  216. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]信息修改失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  217. return;
  218. }
  219. int iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
  220. if (iCnt == 0)
  221. {
  222. MessageBox.Show("[" + strCcm + "]不存在结晶器[" + strID + "]信息,无法修改!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  223. ucmbID.Focus();
  224. return;
  225. }
  226. strErr = "";
  227. string Sql = "update DEV_JJQ_BASE_INFO set "
  228. + "TYPE = '" + strType + "',"
  229. + "OUTERCOPPER = '" + txtTGBH.Text.Trim() + "',"
  230. + "AGE = '" + (txtTgl.Text.Trim() == "" ? "0" : txtTgl.Text.Trim()) + "',"
  231. + "CUPRUMCANALTIME = '" + (txtTbcs.Text.Trim() == "" ? "0" : txtTbcs.Text.Trim()) + "',"
  232. + "CREATIVEDATE = to_date('" + udtePTime.DateTime.ToString("yyyy-MM-dd") + "','yyyy-MM-dd'),"
  233. + "BUYDATE = to_date('" + udteBuyTime.DateTime.ToString("yyyy-MM-dd") + "','yyyy-MM-dd'),"
  234. + "MEMO = '" + txtMemo.Text.Trim() + "' "
  235. + "where CCM_ID = '" + strCcm + "' and CRYSTALLIZERID = '" + strID + "'";
  236. CoreClientParam ccp_up = new CoreClientParam();
  237. ccp_up.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  238. ccp_up.MethodName = "UpdateMethods";
  239. ccp_up.ServerParams = new Object[] { Sql };
  240. ob.ExecuteNonQuery(ccp_up, CoreInvokeType.Internal);
  241. if (!(strErr == null || strErr == ""))
  242. {
  243. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]信息修改失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  244. return;
  245. }
  246. FrmCrystallizerManage frm = (FrmCrystallizerManage)this.Tag;
  247. frm.proc_GetBaseInfo(strCcm, strID);
  248. proc_GetID(strCcm);
  249. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]信息修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  250. return;
  251. }
  252. catch (Exception ex)
  253. {
  254. MessageBox.Show(ex.Message);
  255. }
  256. }
  257. /// <summary>
  258. /// 基本信息删除
  259. /// </summary>
  260. private void proc_Del()
  261. {
  262. try
  263. {
  264. if (ucmbID.Items.Count == 0)
  265. return;
  266. string strCcm = ucmbCCM.Text.Trim();
  267. string strID = ucmbID.Text.Trim();
  268. if (strID.Length == 0)
  269. {
  270. MessageBox.Show("请选择需要删除的结晶器编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  271. ucmbID.Focus();
  272. return;
  273. }
  274. if (MessageBox.Show("确定要删除[" + strCcm + "]结晶器[" + strID + "]的信息吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  275. return;
  276. string strErr = "";
  277. string strSql = "select count(1) from DEV_JJQ_BASE_INFO where CCM_ID = '" + strCcm + "' and CRYSTALLIZERID = '" + strID + "'";
  278. CoreClientParam ccp = new CoreClientParam();
  279. ccp.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  280. ccp.MethodName = "QueryMethods";
  281. ccp.ServerParams = new Object[] { strSql };
  282. DataTable dt = new DataTable();
  283. ccp.SourceDataTable = dt;
  284. ob.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  285. DataSet ds = new DataSet();
  286. ds.Tables.Add(dt);
  287. if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0))
  288. {
  289. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]信息删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  290. return;
  291. }
  292. int iCnt = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
  293. if (iCnt == 0)
  294. {
  295. MessageBox.Show("[" + strCcm + "]不存在结晶器[" + strID + "]信息,无法删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  296. ucmbID.Focus();
  297. return;
  298. }
  299. iCnt = 0;
  300. ds = null;
  301. strErr = "";
  302. string trSql = "select count(1) from DEV_JJQ_USE_DETAIL where CRYSTALLIZERID = (select ID from DEV_JJQ_BASE_INFO where CCM_ID = '" + strCcm + "' and CRYSTALLIZERID = '" + strID + "')";
  303. CoreClientParam ccpselect = new CoreClientParam();
  304. ccpselect.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  305. ccpselect.MethodName = "QueryMethods";
  306. ccpselect.ServerParams = new Object[] { trSql };
  307. DataTable dtt = new DataTable();
  308. ccpselect.SourceDataTable = dtt;
  309. ob.ExecuteQueryToDataTable(ccpselect, CoreInvokeType.Internal);
  310. DataSet dss = new DataSet();
  311. dss.Tables.Add(dtt);
  312. if (strErr != "" || !(dss != null && dss.Tables.Count > 0 && dss.Tables[0].Rows.Count > 0))
  313. {
  314. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]信息删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  315. return;
  316. }
  317. int Cnt = Convert.ToInt32(dss.Tables[0].Rows[0][0]);
  318. if (Cnt > 0)
  319. {
  320. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]存在使用记录,不能删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  321. ucmbID.Focus();
  322. return;
  323. }
  324. iCnt = 0;
  325. ds = null;
  326. strErr = "";
  327. strSql = "select count(1) from DEV_TOOL_REPAIR where TOOLTYPEID = '2' and REPAIRTOOLID = (select ID from DEV_JJQ_BASE_INFO where CCM_ID = '" + strCcm + "' and CRYSTALLIZERID = '" + strID + "')";
  328. CoreClientParam ccpsele = new CoreClientParam();
  329. ccpsele.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  330. ccpsele.MethodName = "QueryMethods";
  331. ccpsele.ServerParams = new Object[] { trSql };
  332. DataTable dtl = new DataTable();
  333. ccpsele.SourceDataTable = dtl;
  334. ob.ExecuteQueryToDataTable(ccpsele, CoreInvokeType.Internal);
  335. DataSet dst = new DataSet();
  336. dst.Tables.Add(dtl);
  337. if (strErr != "" || !(dst != null && dst.Tables.Count > 0 && dst.Tables[0].Rows.Count > 0))
  338. {
  339. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]信息删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  340. return;
  341. }
  342. iCnt = Convert.ToInt32(dst.Tables[0].Rows[0][0]);
  343. if (iCnt > 0)
  344. {
  345. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]存在维修记录,不能删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  346. ucmbID.Focus();
  347. return;
  348. }
  349. strErr = "";
  350. string Sql = "delete from DEV_JJQ_BASE_INFO where CCM_ID = '" + strCcm + "' and CRYSTALLIZERID = '" + strID + "'";
  351. CoreClientParam ccp_del = new CoreClientParam();
  352. ccp_del.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  353. ccp_del.MethodName = "UpdateMethods";
  354. ccp_del.ServerParams = new Object[] { Sql };
  355. ob.ExecuteNonQuery(ccp_del, CoreInvokeType.Internal);
  356. if (!(strErr == null || strErr == ""))
  357. {
  358. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]信息删除失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  359. return;
  360. }
  361. FrmCrystallizerManage frm = (FrmCrystallizerManage)this.Tag;
  362. frm.proc_GetBaseInfo(strCcm, "");
  363. proc_GetID(strCcm);
  364. MessageBox.Show("[" + strCcm + "]结晶器[" + strID + "]信息删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  365. return;
  366. }
  367. catch (Exception ex)
  368. {
  369. MessageBox.Show(ex.Message);
  370. }
  371. }
  372. private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
  373. {
  374. switch (e.ClickedItem.Name)
  375. {
  376. case "ADD":
  377. {
  378. this.proc_Add();
  379. break;
  380. }
  381. case "EDIT":
  382. {
  383. this.proc_Edit();
  384. break;
  385. }
  386. case "DEL":
  387. {
  388. this.proc_Del();
  389. break;
  390. }
  391. case "CLOSE":
  392. {
  393. this.Close();
  394. break;
  395. }
  396. default:
  397. break;
  398. }
  399. }
  400. private void cbbCCM_SelectedIndexChanged(object sender, EventArgs e)
  401. {
  402. if (ucmbCCM.Text.Length > 0)
  403. {
  404. ucmbID.SelectedIndex = -1;
  405. proc_GetID(ucmbCCM.Text);
  406. }
  407. }
  408. private void cbbID_SelectedIndexChanged(object sender, EventArgs e)
  409. {
  410. try
  411. {
  412. if (!bOK)
  413. return;
  414. string strCCM = ucmbCCM.Text.Trim();
  415. string strID = ucmbID.Text.Trim();
  416. if (strID.Length == 0)
  417. return;
  418. string strErr = "";
  419. string strSql = "select case NOWSTATUS when '0' then '下线' when '1' then '上线' when '2' then '维修' when '3' then '备用' end NOWSTATUS,"
  420. + "AGE, CUPRUMCANALTIME, case TYPE when '1' then '板坯' when '2' then '方坯' end TYPE, case NOWSTATUS when '1' then CCM_S_ID end CCM_S_ID,"
  421. + "to_char(CREATIVEDATE,'yyyy-MM-dd') CREATIVEDATE, to_char(BUYDATE,'yyyy-MM-dd') BUYDATE, MEMO, OUTERCOPPER "
  422. + "from DEV_JJQ_BASE_INFO where CRYSTALLIZERID = '" + strID + "' and CCM_ID = '" + strCCM + "'";
  423. CoreClientParam ccp = new CoreClientParam();
  424. ccp.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
  425. ccp.MethodName = "QueryMethods";
  426. ccp.ServerParams = new Object[] { strSql };
  427. DataTable dt = new DataTable();
  428. ccp.SourceDataTable = dt;
  429. ob.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  430. DataSet ds = new DataSet();
  431. ds.Tables.Add(dt);
  432. if (strErr != "" || !(ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0))
  433. {
  434. MessageBox.Show("结晶器[" + strID + "]信息查询失败!\r\n" + strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
  435. return;
  436. }
  437. txtType.Text = Convert.ToString(ds.Tables[0].Rows[0]["TYPE"]);
  438. txtTgl.Text = Convert.ToString(ds.Tables[0].Rows[0]["AGE"]);
  439. txtTGBH.Text = Convert.ToString(ds.Tables[0].Rows[0]["OUTERCOPPER"]);
  440. txtTbcs.Text = Convert.ToString(ds.Tables[0].Rows[0]["CUPRUMCANALTIME"]);
  441. txtStatus.Text = Convert.ToString(ds.Tables[0].Rows[0]["NOWSTATUS"]);
  442. txtPos.Text = Convert.ToString(ds.Tables[0].Rows[0]["CCM_S_ID"]);
  443. udtePTime.DateTime = Convert.ToDateTime(ds.Tables[0].Rows[0]["CREATIVEDATE"]);
  444. udteBuyTime.DateTime = Convert.ToDateTime(ds.Tables[0].Rows[0]["BUYDATE"]);
  445. txtMemo.Text = Convert.ToString(ds.Tables[0].Rows[0]["MEMO"]);
  446. }
  447. catch (Exception ex)
  448. {
  449. MessageBox.Show(ex.Message, "提示");
  450. }
  451. }
  452. }
  453. }