FrmCMByWorkShop.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using WCS_Client.UC;
  11. namespace WCS_Client.Frm
  12. {
  13. public partial class FrmCMByWorkShop : Form
  14. {
  15. public FrmCMByWorkShop()
  16. {
  17. InitializeComponent();
  18. }
  19. private void btnSave_Click(object sender, EventArgs e)
  20. {
  21. if (cmbWorkShopNO.Text == "" || cmbProLine.Text == "")
  22. {
  23. MessageUtil.ShowTips("车间编号和生产线不能为空!");
  24. return;
  25. }
  26. string msg = BaseWorkflow.CMByWorkShop(cmbWorkShopNO.Text, cmbProLine.Text);
  27. MessageUtil.ShowTips(msg);
  28. this.Close();
  29. }
  30. private void btnCancel_Click(object sender, EventArgs e)
  31. {
  32. this.Close();
  33. }
  34. private void cmbProLine_DropDown(object sender, EventArgs e)
  35. {
  36. cmbWorkShopNO.Items.Clear();
  37. TryCachHelper.TryExecute((db) =>
  38. {
  39. if (cmbWorkShopNO.Text == "1")
  40. {
  41. cmbProLine.Items.Add("Mw_1_A");
  42. cmbProLine.Items.Add("Mw_1_B");
  43. cmbProLine.Items.Add("Mw_1_C");
  44. }
  45. });
  46. }
  47. }
  48. }