Make_RePrintLabel.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. using HslCommunication.Profinet.Knx;
  2. using LabelManager2;
  3. using Seagull.BarTender.Print;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading;
  12. using System.Windows.Forms;
  13. using UAS_MES_NEW.DataOperate;
  14. using UAS_MES_NEW.Entity;
  15. using UAS_MES_NEW.PublicForm;
  16. using UAS_MES_NEW.PublicMethod;
  17. namespace UAS_MES_NEW.Make
  18. {
  19. public partial class Make_RePrintLabel : Form
  20. {
  21. DataHelper dh;
  22. LogStringBuilder sql = new LogStringBuilder();
  23. AutoSizeFormClass asc = new AutoSizeFormClass();
  24. Engine engine;
  25. Thread InitPrint;//实例化打印进程
  26. DataTable dt;
  27. DataTable listA;
  28. string getlabel = "";
  29. DataTable mapB;
  30. string ms_id = "";
  31. DataTable formValue;//界面赋值
  32. string type = "";
  33. string errorMessage = "";
  34. public Make_RePrintLabel()
  35. {
  36. InitializeComponent();
  37. }
  38. private void Make_RePrintLabel_Load(object sender, EventArgs e)
  39. {
  40. asc.controllInitializeSize(this);
  41. OperateResult.AppendText(">>请输入SN\n", Color.Black);
  42. InitPrint = new Thread(InPrint);
  43. SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
  44. BaseUtil.SetFormCenter(stw);
  45. stw.ShowDialog();
  46. inputText.Focus();
  47. dh = SystemInf.dh;
  48. }
  49. private void InPrint()
  50. {
  51. try
  52. {
  53. engine = new Engine(true);
  54. BaseUtil.WriteLbl();
  55. }
  56. catch (Exception)
  57. {
  58. OperateResult.AppendText("未正确安装Bartender软件\n", Color.Red);
  59. }
  60. }
  61. private void Make_RePrintLabel_SizeChanged(object sender, EventArgs e)
  62. {
  63. //窗体大小变化的时候
  64. asc.controlAutoSize(this);
  65. }
  66. private void Make_RePrintLabel_FormClosing(object sender, FormClosingEventArgs e)
  67. {
  68. //窗口关闭的时候
  69. BaseUtil.ClosePrint(engine);
  70. }
  71. private void radioButton_CheckedChange(object sender, EventArgs e)
  72. {
  73. RadioButton btn = sender as RadioButton;
  74. if ((btn.Name == "giftBox" || btn.Name == "fuselagel") && btn.Checked)
  75. {
  76. //如果是切换成彩盒或者机身标提示用户 输入SN
  77. OperateResult.AppendText(">>请输入SN\n", Color.Black);
  78. clearAll();
  79. }
  80. else if (btn.Name == "CartonBox" && btn.Checked)
  81. {
  82. OperateResult.AppendText(">>请输入卡通箱号\n", Color.Black);
  83. clearAll();
  84. }
  85. else if (btn.Name == "BigBox" && btn.Checked)
  86. {
  87. OperateResult.AppendText(">>请输入大箱号\n", Color.Black);
  88. clearAll();
  89. }
  90. else if (btn.Name == "Pallte" && btn.Checked)
  91. {
  92. OperateResult.AppendText(">>请输入栈板号\n", Color.Black);
  93. clearAll();
  94. }
  95. }
  96. private void inputText_KeyDown(object sender, KeyEventArgs e)
  97. {
  98. //按下enter键
  99. if (e.KeyCode == Keys.Enter)
  100. {
  101. if (inputText.Text == "")
  102. {
  103. OperateResult.AppendText("<<输入不能为空\n", Color.Red);
  104. return;
  105. }
  106. OperateResult.AppendText(">>" + inputText.Text + "\n", Color.Black);
  107. //打印类型为彩盒或者机身标
  108. if (giftBox.Checked || fuselagel.Checked)
  109. {
  110. //select max(ms_id)ms_id from makeserial where ms_sncode=?
  111. ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + inputText.Text + "'").ToString();
  112. if (ms_id == "")
  113. {
  114. //如果ms_id 无值或者为空,提示用户SN不存在,请输入SN
  115. sql.Clear();
  116. sql.Append("select max(ms_id) ms_id from makeserial where ms_imei1 ='" + inputText.Text + "'");
  117. dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
  118. if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
  119. {
  120. sql.Clear();
  121. sql.Append("select max(ms_id) ms_id from makeserial where ms_imei2 ='" + inputText.Text + "'");
  122. dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
  123. if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
  124. {
  125. sql.Clear();
  126. sql.Append("select max(ms_id) ms_id from makeserial left join makeimeilist on mil_sncode=ms_sncode and mil_makecode=ms_makecode where mil_imei1 ='" + inputText.Text + "'");
  127. dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
  128. if (dt.Rows.Count == 0 || dt.Rows[0]["ms_id"].ToString() == "")
  129. {
  130. OperateResult.AppendText("<<SN错误,序列号" + inputText.Text + "不存在\n", Color.Red, inputText);
  131. OperateResult.AppendText(">>请输入SN\n", Color.Black);
  132. return;
  133. }
  134. else
  135. {
  136. ms_id = dt.Rows[0]["ms_id"].ToString();
  137. }
  138. }
  139. else
  140. {
  141. ms_id = dt.Rows[0]["ms_id"].ToString();
  142. }
  143. }
  144. else
  145. {
  146. ms_id = dt.Rows[0]["ms_id"].ToString();
  147. }
  148. }
  149. ////判断是否装箱通过
  150. //if (checkPacked())
  151. //{
  152. // return;
  153. //}
  154. //界面赋值
  155. formValue = (DataTable)dh.ExecuteSql("select ms_sncode,ms_makecode,pr_code,pr_detail from makeserial left join product on MS_PRODCODE=pr_code where ms_id='" + ms_id + "'", "select");
  156. BaseUtil.SetFormValue(this.Controls, formValue);
  157. //无值,可补打
  158. inputValue.Text = formValue.Rows[0]["ms_sncode"].ToString();
  159. inputText.Text = "";
  160. }
  161. //打印类型为卡通箱
  162. else if (CartonBox.Checked)
  163. {
  164. dt = (DataTable)dh.ExecuteSql("select ms_outboxcode from makeserial where ms_outboxcode='" + inputText.Text + "' or ms_imei2='" + inputText.Text + "' or ms_imei1='" + inputText.Text + "' order by ms_id desc", "select");
  165. if (dt.Rows.Count > 0)
  166. {
  167. inputText.Text = dt.Rows[0]["ms_outboxcode"].ToString();
  168. }
  169. else
  170. {
  171. dt = (DataTable)dh.ExecuteSql("select ms_outboxcode from makeserial where ms_imei2='" + inputText.Text + "' order by ms_id desc", "select");
  172. if (dt.Rows.Count > 0)
  173. {
  174. inputText.Text = dt.Rows[0]["ms_outboxcode"].ToString();
  175. }
  176. }
  177. //查询箱号是否存在
  178. dt = (DataTable)dh.ExecuteSql("select pa_id,pa_prodcode pr_code,pa_makecode ms_makecode,pr_detail from package left join product on pr_code=pa_prodcode where pa_outboxcode='" + inputText.Text + "' and pa_type=1", "select");
  179. if (dt.Rows.Count == 0)
  180. {
  181. //无值,返回提示用户“箱号不存在”, “>>请输入卡通箱号”
  182. OperateResult.AppendText("<<箱号:" + inputText.Text + "不存在\n", Color.Red, inputText);
  183. OperateResult.AppendText(">>请输入卡通箱号\n", Color.Black);
  184. return;
  185. }
  186. //界面赋值
  187. BaseUtil.SetFormValue(this.Controls, dt);
  188. //有值,可以打
  189. //展示产品编号和标签模板到界面
  190. inputValue.Text = inputText.Text;
  191. inputText.Text = "";
  192. }
  193. else if (BigBox.Checked)
  194. {
  195. dt = (DataTable)dh.ExecuteSql("select ms_outboxcode from makeserial where ms_imei1='" + inputText.Text + "' order by ms_id desc", "select");
  196. if (dt.Rows.Count > 0)
  197. {
  198. inputText.Text = dt.Rows[0]["ms_outboxcode"].ToString();
  199. }
  200. else
  201. {
  202. dt = (DataTable)dh.ExecuteSql("select ms_outboxcode from makeserial where ms_imei2='" + inputText.Text + "' order by ms_id desc", "select");
  203. if (dt.Rows.Count > 0)
  204. {
  205. inputText.Text = dt.Rows[0]["ms_outboxcode"].ToString();
  206. }
  207. }
  208. //查询箱号是否存在
  209. dt = (DataTable)dh.ExecuteSql("select pa_id,pa_prodcode pr_code,pa_makecode ms_makecode,pr_detail from package left join product on pr_code=pa_prodcode where pa_outboxcode='" + inputText.Text + "' and pa_type=2", "select");
  210. if (dt.Rows.Count == 0)
  211. {
  212. //无值,返回提示用户“箱号不存在”, “>>请输入卡通箱号”
  213. OperateResult.AppendText("<<箱号:" + inputText.Text + "不存在\n", Color.Red, inputText);
  214. OperateResult.AppendText(">>请输入大箱号\n", Color.Black);
  215. return;
  216. }
  217. //界面赋值
  218. BaseUtil.SetFormValue(this.Controls, dt);
  219. //有值,可以打
  220. //展示产品编号和标签模板到界面
  221. inputValue.Text = inputText.Text;
  222. inputText.Text = "";
  223. }
  224. else if (Pallte.Checked)
  225. {
  226. dt = (DataTable)dh.ExecuteSql("select ms_outboxcode from makeserial where ms_imei1='" + inputText.Text + "' order by ms_id desc", "select");
  227. if (dt.Rows.Count > 0)
  228. {
  229. inputText.Text = dt.Rows[0]["ms_outboxcode"].ToString();
  230. }
  231. else
  232. {
  233. dt = (DataTable)dh.ExecuteSql("select ms_outboxcode from makeserial where ms_imei2='" + inputText.Text + "' order by ms_id desc", "select");
  234. if (dt.Rows.Count > 0)
  235. {
  236. inputText.Text = dt.Rows[0]["ms_outboxcode"].ToString();
  237. }
  238. }
  239. //查询箱号是否存在
  240. dt = (DataTable)dh.ExecuteSql("select pa_id,pa_prodcode pr_code,pa_makecode ms_makecode,pr_detail from package left join product on pr_code=pa_prodcode where pa_outboxcode='" + inputText.Text + "' and pa_type=3", "select");
  241. if (dt.Rows.Count == 0)
  242. {
  243. //无值,返回提示用户“箱号不存在”, “>>请输入卡通箱号”
  244. OperateResult.AppendText("<<栈板:" + inputText.Text + "不存在\n", Color.Red, inputText);
  245. OperateResult.AppendText(">>请输入栈板号\n", Color.Black);
  246. return;
  247. }
  248. //界面赋值
  249. BaseUtil.SetFormValue(this.Controls, dt);
  250. //有值,可以打
  251. //展示产品编号和标签模板到界面
  252. inputValue.Text = inputText.Text;
  253. inputText.Text = "";
  254. }
  255. print_Click(sender, new EventArgs());
  256. }
  257. }
  258. private void PrintLabel_TextChanged(object sender, EventArgs e)
  259. {
  260. if (pr_code.Text == "")
  261. {
  262. return;
  263. }
  264. if (fuselagel.Checked)
  265. type = "机身标";
  266. else if (giftBox.Checked)
  267. type = "彩盒标";
  268. else if (CartonBox.Checked)
  269. type = "卡通箱标";
  270. else if (BigBox.Checked)
  271. type = "大箱标";
  272. else
  273. type = "栈板标";
  274. listA = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='" + type + "' and la_statuscode='AUDITED' order by la_isdefault", "select");
  275. if (listA.Rows.Count == 0)
  276. {
  277. listA = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode is null and la_templatetype='" + type + "' and la_statuscode='AUDITED' order by la_isdefault", "select");
  278. }
  279. if (listA.Rows.Count > 0)
  280. {
  281. string la_id = listA.Rows[0]["la_id"].ToString();
  282. listA = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select * from table(select parsestring(LA_SOFTTYPE,';') from label where la_id='" + la_id + "' ) where COLUMN_VALUE is not null)", "select");
  283. PrintLabel.DataSource = listA;
  284. PrintLabel.DisplayMember = "la_url";
  285. PrintLabel.ValueMember = "la_id";
  286. }
  287. }
  288. private void print_Click(object sender, EventArgs e)
  289. {
  290. //输入值字段值不为空,打印不为空,有选中打印模板,才可以进行打印,打印前再次判断
  291. if (inputValue.Text == "")
  292. {
  293. OperateResult.AppendText("<<无箱号或者序列号\n", Color.Red);
  294. return;
  295. }
  296. if (PrintLabel.Text == "")
  297. {
  298. OperateResult.AppendText("<<无打印模板\n", Color.Red);
  299. return;
  300. }
  301. //打印类型 彩盒或者标签,再次判断是否已装箱,未转号
  302. if (giftBox.Checked || fuselagel.Checked)
  303. {
  304. mapB = (DataTable)dh.ExecuteSql("select ms_outboxcode, nvl(ms_downstatus,0) ms_downstatus from makeserial where ms_id='" + ms_id + "' and ms_sncode='" + inputValue.Text + "'", "select");
  305. if (mapB.Rows.Count == 0)
  306. {
  307. //无值提示用户序列号错误,不存在或者已经发生转号
  308. OperateResult.AppendText("<<序列号错误,不存在或已经发生转号\n", Color.Red);
  309. return;
  310. }
  311. //如果ms_outboxcode 不为空,则提示用户,已经装箱不允许单独打印
  312. if (mapB.Rows[0]["ms_outboxcode"].ToString() != "" && !AllowInBox.Checked)
  313. {
  314. OperateResult.AppendText("<<SN:" + inputValue.Text + "已经装箱" + mapB.Rows[0]["ms_outboxcode"].ToString() + "不允许单独补打\n", Color.Red);
  315. return;
  316. }
  317. //判定通过进行打印
  318. //doc = lbl.Documents.Open(PrintLabel.Text);
  319. if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, giftBox.Checked ? "彩盒标" : "机身标", "-1", out errorMessage))
  320. {
  321. //按照打印张数打印
  322. OperateResult.AppendText("<<打印成功\n", Color.Green);
  323. }
  324. else
  325. {
  326. OperateResult.AppendText(errorMessage + "\n", Color.Red);
  327. }
  328. //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
  329. LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, giftBox.Checked ? "彩盒标补打印" : "机身标补打印", "补打印成功", inputValue.Text, "");
  330. //如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
  331. if (mapB.Rows[0]["ms_downstatus"].ToString() == "0")
  332. {
  333. //dh.ExecuteSql("update makeserial set ms_downstatus='-1' where ms_id='" + ms_id + "'", "update");
  334. //插入数据
  335. //putInfo2MakeDown();
  336. }
  337. }
  338. //打印类型为卡通箱标签
  339. else if (CartonBox.Checked)
  340. {
  341. //select pa_downstatus from package where pa_outboxcode=? 输入值code
  342. mapB = (DataTable)dh.ExecuteSql("select pa_downstatus from package where pa_outboxcode='" + inputValue.Text + "'", "select");
  343. //无值提示用户箱号错误,不存在。
  344. if (mapB.Rows.Count == 0)
  345. {
  346. OperateResult.AppendText("<<箱号:" + inputValue.Text + "错误,不存在\n", Color.Red);
  347. return;
  348. }
  349. //doc = lbl.Documents.Open(PrintLabel.Text);
  350. if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, "卡通箱标", "-1", out errorMessage))
  351. {
  352. //判断通过,打印
  353. OperateResult.AppendText("<<打印成功\n", Color.Green);
  354. }
  355. else
  356. {
  357. OperateResult.AppendText(errorMessage + "\n", Color.Red);
  358. }
  359. //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
  360. LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱标签补打印,箱号:" + inputValue.Text, "补打印成功", inputValue.Text, "");
  361. //如果pa_downstatus<>0,则更新pa_downstatus=-1 where pa_outboxcode=?code,同时插入记录至表 MAKEDOWN
  362. //if (mapB.Rows[0]["pa_downstatus"].ToString() == "0")
  363. //{
  364. // dh.ExecuteSql("update package set pa_downstatus='-1' where pa_outboxcode='" + inputValue.Text + "'", "update");
  365. // //插入MakeDown表
  366. // putInfo2MakeDown();
  367. //}
  368. }
  369. else if (BigBox.Checked)
  370. {
  371. //select pa_downstatus from package where pa_outboxcode=? 输入值code
  372. mapB = (DataTable)dh.ExecuteSql("select pa_downstatus from package where pa_outboxcode='" + inputValue.Text + "'", "select");
  373. //无值提示用户箱号错误,不存在。
  374. if (mapB.Rows.Count == 0)
  375. {
  376. OperateResult.AppendText("<<箱号:" + inputValue.Text + "错误,不存在\n", Color.Red);
  377. return;
  378. }
  379. //doc = lbl.Documents.Open(PrintLabel.Text);
  380. if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, "大箱标", "-1", out errorMessage))
  381. {
  382. //判断通过,打印
  383. OperateResult.AppendText("<<打印成功\n", Color.Green);
  384. }
  385. else
  386. {
  387. OperateResult.AppendText(errorMessage + "\n", Color.Red);
  388. }
  389. //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
  390. LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "大箱标签补打印,箱号:" + inputValue.Text, "补打印成功", inputValue.Text, "");
  391. //如果pa_downstatus<>0,则更新pa_downstatus=-1 where pa_outboxcode=?code,同时插入记录至表 MAKEDOWN
  392. //if (mapB.Rows[0]["pa_downstatus"].ToString() == "0")
  393. //{
  394. // dh.ExecuteSql("update package set pa_downstatus='-1' where pa_outboxcode='" + inputValue.Text + "'", "update");
  395. // //插入MakeDown表
  396. // putInfo2MakeDown();
  397. //}
  398. }
  399. else if (Pallte.Checked)
  400. {
  401. //select pa_downstatus from package where pa_outboxcode=? 输入值code
  402. mapB = (DataTable)dh.ExecuteSql("select pa_downstatus from package where pa_outboxcode='" + inputValue.Text + "'", "select");
  403. //无值提示用户箱号错误,不存在。
  404. if (mapB.Rows.Count == 0)
  405. {
  406. OperateResult.AppendText("<<栈板号:" + inputValue.Text + "错误,不存在\n", Color.Red);
  407. return;
  408. }
  409. if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, "栈板标", "-1", out errorMessage))
  410. {
  411. //判断通过,打印
  412. OperateResult.AppendText("<<打印成功\n", Color.Green);
  413. }
  414. else
  415. {
  416. OperateResult.AppendText(errorMessage + "\n", Color.Red);
  417. }
  418. //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
  419. LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "栈板标签补打印,栈板号:" + inputValue.Text, "补打印成功", inputValue.Text, "");
  420. }
  421. }
  422. /// <summary>
  423. /// 插入表MAKEDOWN
  424. /// </summary>
  425. private void putInfo2MakeDown()
  426. {
  427. //插入数据至表MAKEDOWN
  428. string md_code = "";
  429. LogicHandler.GetSerialNumByCaller("MakeDown", out md_code);
  430. sql.Clear();
  431. sql.Append("INSERT INTO MAKEDOWN (MD_ID,MD_LINECODE,MD_SCCODE,MD_STEPCODE,");
  432. sql.Append((CartonBox.Checked ? "MD_OUTBOXCODE" : "MD_SNCODE") + ",MD_PRODCODE,MD_MACODE, MD_DOWNREASON, MD_CODE,");
  433. sql.Append("MD_DOWNDATE,MD_DOWNMAN,MD_STATUS) values (MAKEDOWN_seq.nextval,'" + User.UserLineCode + "','" + User.UserSourceCode + "',");
  434. sql.Append("'" + User.CurrentStepCode + "','" + inputValue.Text + "','" + pr_code.Text + "','" + ms_makecode.Text + "','补打标签','" + md_code + "',sysdate,'" + User.UserCode + "','-1')");
  435. dh.ExecuteSql(sql.GetString(), "insert");
  436. }
  437. private void rePrintCheck_KeyDown(object sender, KeyEventArgs e)
  438. {
  439. }
  440. /// <summary>
  441. /// 清除信息
  442. /// </summary>
  443. private void clearAll()
  444. {
  445. //清除输入值、工单代码、产品编号,名称、打印模板、核对第一次输入的SN
  446. inputValue.Text = "";
  447. ms_makecode.Text = "";
  448. pr_code.Text = "";
  449. pr_detail.Text = "";
  450. if (listA != null)
  451. {
  452. listA.Clear();
  453. }
  454. }
  455. }
  456. }