ActionsLog.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using GCAS.Code;
  2. using System;
  3. namespace GCAS.Actions
  4. {
  5. public partial class ActionsLog : DevExpress.XtraEditors.XtraForm
  6. {
  7. private ActionsRepository actionsRepository;
  8. public ActionsLog()
  9. {
  10. InitializeComponent();
  11. }
  12. private void ActionsLog_Load(object sender, EventArgs e)
  13. {
  14. date_start.EditValue = DateTime.Today;
  15. date_end.EditValue = DateTime.Today.AddDays(1).AddSeconds(-1);
  16. actionsRepository = new ActionsRepository();
  17. BindGrid();
  18. }
  19. private async void BindGrid()
  20. {
  21. gridView1.LoadingPanelVisible = true;
  22. var list = await actionsRepository.GetList(text_key.Text, (DateTime)date_start.EditValue, ((DateTime)date_end.EditValue).AddDays(1).AddSeconds(-1));
  23. gridControl1.DataSource = list;
  24. gridView1.FocusedRowHandle = -1;
  25. gridView1.LoadingPanelVisible = false;
  26. }
  27. private void btn_search_Click(object sender, EventArgs e)
  28. {
  29. BindGrid();
  30. }
  31. private void text_key_Click(object sender, EventArgs e)
  32. {
  33. SoftKeyboard.ActiveSoftKeyboard(sender);
  34. }
  35. }
  36. }