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
{
public partial class XhsProjectBasicInfoHydroCtrl : DevExpress.XtraEditors.XtraUserControl
{
public XhsProjectBasicInfoHydroCtrl()
{
InitializeComponent();
}
///
/// 绑定数据
///
public async void SetBindingData(long projectId)
{
var projectSite = await BLLFactory.Instance.GetDefaultByProjectID(projectId);
if (projectSite == null)
{
return;
}
var hydroRelation = await new Yw.BLL.HydroModelRelation().GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, projectSite.ID, HStation.Xhs.Purpose.Simulation);
if (hydroRelation == null)
{
return;
}
var info = await new Yw.BLL.HydroModelInfo().GetByID(hydroRelation.ModelID);
this.hydroParterListCtrl1.SetBindingData(info);
}
}
}