Employee_Data.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. try { UAS_MES_NEW.I18n.LanguageManager.Localize(this); } catch { }
  24. }
  25. private void 人员分组_Load(object sender, EventArgs e)
  26. {
  27. asc.controllInitializeSize(this);
  28. dh = SystemInf.dh;
  29. LoadData();
  30. em_name11.KeyDown += ScreenEvent;
  31. em_depart1.KeyDown += ScreenEvent;
  32. em_position1.KeyDown += ScreenEvent;
  33. em_code11.KeyDown += ScreenEvent;
  34. }
  35. private void Screen_Click(object sender, EventArgs e)
  36. {
  37. LoadData();
  38. }
  39. private void LoadData()
  40. {
  41. string Field = BaseUtil.GetGridViewSelectContent(Employee);
  42. condition = BaseUtil.GetScreenSqlCondition(em_name11, em_code11, em_depart1, em_position1);
  43. pagination1.BindDataToNavigator(Employee, "employee", Field, "em_id", "", condition.Replace("where", "").ToString());
  44. }
  45. private void 人员资料_SizeChanged(object sender, EventArgs e)
  46. {
  47. asc.controlAutoSize(this);
  48. }
  49. private void ScreenEvent(object senedr, KeyEventArgs e)
  50. {
  51. if (e.KeyCode == Keys.Enter)
  52. Screen.PerformClick();
  53. }
  54. }
  55. }