ButtonAddRow.cs 860 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Data;
  3. using DevExpress.XtraEditors;
  4. using UAS_DeviceMonitor.Entity;
  5. namespace UAS_DeviceMonitor.CustomerControl.Button
  6. {
  7. public partial class ButtonAddRow : SimpleButton
  8. {
  9. private AutoDataGridControl.AutoDataGridControl grid;
  10. public AutoDataGridControl.AutoDataGridControl Grid
  11. {
  12. get
  13. {
  14. return grid;
  15. }
  16. set
  17. {
  18. grid = value;
  19. }
  20. }
  21. public ButtonAddRow()
  22. {
  23. InitializeComponent();
  24. }
  25. private void ButtonSaveGrid_Click(object sender, EventArgs e)
  26. {
  27. DataTable dt = (DataTable)grid.DataSource;
  28. if (dt != null)
  29. SystemInf.dh.SaveDataTable(dt, grid.TableName, grid.ID, grid.InsertSQL);
  30. }
  31. }
  32. }