| | |
| | | using DevExpress.XtraEditors; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class XhsProjectSimulationHydroCheckFailedDlg : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | public XhsProjectSimulationHydroCheckFailedDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.gridView1.SetNormalView(30); |
| | | this.gridView1.RegistCustomDrawRowIndicator(40); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public void SetBindingData(List<Yw.EPAnet.CheckFailed> allFailedList) |
| | | { |
| | | _allBindingList = new List<XhsProjectSimulationHydroCheckFailedViewModel>(); |
| | | if (allFailedList != null && allFailedList.Count > 0) |
| | | { |
| | | foreach (var failed in allFailedList) |
| | | { |
| | | var vm = new XhsProjectSimulationHydroCheckFailedViewModel(failed); |
| | | _allBindingList.Add(vm); |
| | | } |
| | | } |
| | | this.xhsProjectSimulationHydroCheckFailedViewModelBindingSource.DataSource = _allBindingList; |
| | | this.xhsProjectSimulationHydroCheckFailedViewModelBindingSource.ResetBindings(false); |
| | | this.xhsProjectSimulationHydroCheckFailedCtrl1.SetBindingData(allFailedList); |
| | | } |
| | | |
| | | private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) |
| | | private void xhsProjectSimulationHydroCheckFailedCtrl1_HydroClickEvent(string obj) |
| | | { |
| | | var row = this.gridView1.GetRow(e.RowHandle) as XhsProjectSimulationHydroCheckFailedViewModel; |
| | | if (row == null) |
| | | { |
| | | return; |
| | | } |
| | | this.HydroClickEvent?.Invoke(row.ParterId); |
| | | this.HydroClickEvent?.Invoke(obj); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |