FrmUpdatePriority.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using DevComponents.DotNetBar;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows.Forms;
  11. using WCS_Client.UC;
  12. namespace WCS_Client.Frm
  13. {
  14. public partial class FrmUpdatePriority : Office2007Form
  15. {
  16. DataRow dr = null;
  17. public FrmUpdatePriority(DataRow datarow)
  18. {
  19. InitializeComponent();
  20. dr = datarow;
  21. lbltask_no.Text = dr["ID"].ToString();
  22. lblwmstask_no.Text = dr["WMSTASK"].ToString();
  23. lblBarCode.Text = dr["BARCODE"].ToString();
  24. lblStartAddress.Text = dr["ADDRFROM"].ToString();
  25. lblwcsNextAddress.Text = dr["ADDRNEXT"].ToString();
  26. lblEndAddress.Text = dr["ADDRTO"].ToString();
  27. nudPriority.Value = Convert.ToInt32(dr["Priority"].ToString());
  28. }
  29. private void btnCancel_Click(object sender, EventArgs e)
  30. {
  31. this.Close();
  32. }
  33. private void btnSave_Click(object sender, EventArgs e)
  34. {
  35. if (string.IsNullOrEmpty(txtReason.Text))
  36. {
  37. MessageBox.Show("请输入原因");
  38. return;
  39. }
  40. var result = MessageUtil.ShowYesNoAndWarning(string.Format("任务[{0}]确定要变更优先级吗?", lbltask_no.Text.Trim()));
  41. if (result == DialogResult.Yes)
  42. {
  43. string massge = BaseWorkflow.UpdateTaskPriority(Convert.ToInt32(lbltask_no.Text.Trim()), (int)nudPriority.Value);
  44. MessageUtil.ShowTips(massge);
  45. this.Close();
  46. }
  47. }
  48. }
  49. }