Employee_Data.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. using System.Windows.Forms;
  3. using UAS_MES_NEW.DataOperate;
  4. using UAS_MES_NEW.Entity;
  5. using UAS_MES_NEW.PublicMethod;
  6. namespace UAS_MES_NEW.Employee
  7. {
  8. public partial class Employee_Data : Form
  9. {
  10. //筛选条件
  11. string condition;
  12. DataHelper dh;
  13. AutoSizeFormClass asc = new AutoSizeFormClass();
  14. public Employee_Data()
  15. {
  16. InitializeComponent();
  17. }
  18. private void 人员分组_Load(object sender, EventArgs e)
  19. {
  20. asc.controllInitializeSize(this);
  21. dh = SystemInf.dh;
  22. LoadData();
  23. em_name11.KeyDown += ScreenEvent;
  24. em_depart1.KeyDown += ScreenEvent;
  25. em_position1.KeyDown += ScreenEvent;
  26. em_code11.KeyDown += ScreenEvent;
  27. }
  28. private void Screen_Click(object sender, EventArgs e)
  29. {
  30. LoadData();
  31. }
  32. private void LoadData()
  33. {
  34. string Field = BaseUtil.GetGridViewSelectContent(Employee);
  35. condition = BaseUtil.GetScreenSqlCondition(em_name11, em_code11, em_depart1, em_position1);
  36. pagination1.BindDataToNavigator(Employee, "employee", Field, "em_id", "", condition.Replace("where", "").ToString());
  37. }
  38. private void 人员资料_SizeChanged(object sender, EventArgs e)
  39. {
  40. asc.controlAutoSize(this);
  41. }
  42. private void ScreenEvent(object senedr, KeyEventArgs e)
  43. {
  44. if (e.KeyCode == Keys.Enter)
  45. Screen.PerformClick();
  46. }
  47. }
  48. }