Employee_Data.cs 1.7 KB

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