锐腾搅拌上料功能
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.1 KiB

5 months ago
  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 DevExpress.XtraEditors;
  9. using ICSSoft.Frame.Data.Entity;
  10. using ICSSoft.Frame.Data.BLL;
  11. using ICSSoft.Base.Config.AppConfig;
  12. namespace ICSSoft.Frame.APP
  13. {
  14. public partial class FormICSMO2RCARDSearch : DevExpress.XtraEditors.XtraForm
  15. {
  16. private string MoId = "";
  17. private string MoCode = "";
  18. private decimal Qty = 0.00m;
  19. public FormICSMO2RCARDSearch()
  20. {
  21. InitializeComponent();
  22. }
  23. public FormICSMO2RCARDSearch(string moid,string mocode,decimal qty)
  24. {
  25. InitializeComponent();
  26. MoId = moid;
  27. MoCode = mocode;
  28. Qty = qty;
  29. txtMoCode.Properties.ReadOnly = true;
  30. txtMoCode.Text = MoCode;
  31. int a = Convert.ToInt32(qty);
  32. txtqty.Text = Convert.ToString(a);
  33. }
  34. private void btnOK_Click(object sender, EventArgs e)
  35. {
  36. int shuliang = int.Parse(txtqty.Text);
  37. string rac = "";
  38. int max = 0;
  39. List<string> rcard = new List<string>();
  40. max = ICSMOBLL.SearchMaxS(MoCode, AppConfig.AppConnectString);
  41. for (int i = 0; i < shuliang; i++)
  42. {
  43. rac = "";
  44. max++;
  45. rac = max.ToString().PadLeft(5, '0');
  46. rac = MoCode + rac;
  47. rcard.Add(rac);
  48. }
  49. ICSMOBLL.AddMO2RCARD(rcard, MoId, MoCode, AppConfig.AppConnectString);
  50. ICSBaseSimpleCode.AppshowMessageBox("生成成功");
  51. this.Close();
  52. this.DialogResult = DialogResult.Yes;
  53. }
  54. #region 关闭
  55. private void btnCancle_Click(object sender, EventArgs e)
  56. {
  57. this.Close();
  58. this.DialogResult = DialogResult.Cancel;
  59. }
  60. private void btnClose_Click(object sender, EventArgs e)
  61. {
  62. this.Close();
  63. this.DialogResult = DialogResult.Cancel;
  64. }
  65. #endregion
  66. }
  67. }