版博士V2.0程序
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

62 строки
1.7 KiB

  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. namespace ProductionControl
  11. {
  12. public partial class FrmReport : Form
  13. {
  14. public FrmReport()
  15. {
  16. InitializeComponent();
  17. initDataView();
  18. }
  19. private void initDataView()
  20. {
  21. var list = new BindingList<Product>();
  22. //list.Add(new Product("0001", "2寸手机屏"));
  23. //list.Add(new Product("0001", "3.5寸手机屏"));
  24. tsslCount.Text = $"共 {list.Count} 条记录";
  25. dataGridView1.DataSource = new BindingSource(list, null);
  26. }
  27. private class Product
  28. {
  29. public Product(string _code, string _name)
  30. {
  31. code = _code;
  32. name = _name;
  33. }
  34. public string code { get; set; }
  35. public string name { get; set; }
  36. public string spec { get { return "1-1323"; } }
  37. public string stepCode { get { return "0001"; } }
  38. public string stepName { get { return "屏幕检测"; } }
  39. public string userName { get { return "管理员"; } }
  40. public string dateTime { get { return DateTime.Now.ToString("yyyy-MM-dd HH:mm"); } }
  41. }
  42. private void toolStripButton2_Click(object sender, EventArgs e)
  43. {
  44. }
  45. private void toolStripButton3_Click(object sender, EventArgs e)
  46. {
  47. }
  48. private void toolStripButton1_Click(object sender, EventArgs e)
  49. {
  50. }
  51. private void FrmProductList_Load(object sender, EventArgs e)
  52. {
  53. }
  54. }
  55. }