Employee_Data.cs 1.7 KB

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