Default.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 toolStripButton2_Click(object sender, EventArgs e)
  21. {
  22. Configure configureForm = new Configure();
  23. configureForm.TopLevel = false;
  24. configureForm.Show();
  25. }
  26. private void button10_Click(object sender, EventArgs e)
  27. {
  28. SelectWork selectWork = new SelectWork();
  29. DialogResult result = selectWork.ShowDialog();
  30. if (result == DialogResult.OK)
  31. {
  32. string workId = selectWork.selectValue;
  33. //基本信息
  34. Jpsoft.BLL.Work bllWork = new Jpsoft.BLL.Work();
  35. Jpsoft.Model.Work modelWork = bllWork.GetModel(workId);
  36. Jpsoft.BLL.Customer bllCustomer = new Jpsoft.BLL.Customer();
  37. Jpsoft.Model.Customer modelCustomer = bllCustomer.GetModel(modelWork.customer_id);
  38. this.labCustomer.Text = "客户:" + modelCustomer.name_;
  39. this.labName.Text = "品种及规格:" + modelWork.name_;
  40. this.labWidth.Text = "幅宽:" + modelWork.width_.ToString();
  41. this.labNumber.Text = "编号:" + modelWork.number_;
  42. this.labColour.Text = "色泽:" + modelWork.colour_;
  43. this.labTagFactorSave.Text = "加码:" + modelWork.tag_factor_save.ToString();
  44. //库存信息
  45. Jpsoft.BLL.Stock bllStock = new Jpsoft.BLL.Stock();
  46. List<Jpsoft.Model.Stock> listStock = bllStock.GetModelList(String.Format("del_flag=0 and work_id='{0}'", workId));
  47. this.dataGridView1.AutoGenerateColumns = false;
  48. this.dataGridView1.DataSource = listStock;
  49. }
  50. }
  51. private void button11_Click(object sender, EventArgs e)
  52. {
  53. WorkNumber workNumber = new WorkNumber();
  54. DialogResult result = workNumber.ShowDialog();
  55. if (result == DialogResult.OK)
  56. {
  57. }
  58. }
  59. }
  60. }