Default.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Drawing.Printing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows.Forms;
  11. using static System.ComponentModel.Design.ObjectSelectorEditor;
  12. namespace WinForms
  13. {
  14. public partial class Default : Form
  15. {
  16. public Default()
  17. {
  18. InitializeComponent();
  19. }
  20. private void button10_Click(object sender, EventArgs e)
  21. {
  22. SelectWork selectWork = new SelectWork();
  23. DialogResult result = selectWork.ShowDialog();
  24. if (result == DialogResult.OK)
  25. {
  26. string workId = selectWork.selectValue;
  27. //基本信息
  28. Jpsoft.BLL.Work bllWork = new Jpsoft.BLL.Work();
  29. Jpsoft.Model.Work modelWork = bllWork.GetModel(workId);
  30. Jpsoft.BLL.Customer bllCustomer = new Jpsoft.BLL.Customer();
  31. Jpsoft.Model.Customer modelCustomer = bllCustomer.GetModel(modelWork.customer_id);
  32. this.labCustomer.Text = "客户:" + modelCustomer.name_;
  33. this.labName.Text = "品种及规格:" + modelWork.name_;
  34. this.labWidth.Text = "幅宽:" + modelWork.width_.ToString();
  35. this.labNumber.Text = "编号:" + modelWork.number_;
  36. this.labColour.Text = "色泽:" + modelWork.colour_;
  37. this.labTagFactorSave.Text = "加码:" + modelWork.tag_factor_save.ToString();
  38. //库存信息
  39. Jpsoft.BLL.Stock bllStock = new Jpsoft.BLL.Stock();
  40. List<Jpsoft.Model.Stock> listStock = bllStock.GetModelList(String.Format("del_flag=0 and work_id='{0}'", workId));
  41. this.dataGridView1.AutoGenerateColumns = false;
  42. this.dataGridView1.DataSource = listStock;
  43. }
  44. }
  45. private void button11_Click(object sender, EventArgs e)
  46. {
  47. WorkNumber workNumber = new WorkNumber();
  48. DialogResult result = workNumber.ShowDialog();
  49. if (result == DialogResult.OK)
  50. {
  51. }
  52. }
  53. private void btnSetting_Click(object sender, EventArgs e)
  54. {
  55. Configure configureForm = new Configure();
  56. configureForm.ShowDialog();
  57. }
  58. }
  59. }