using DevExpress.XtraEditors;
|
using HStation.BLL;
|
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 XhsProjectBasicInfoViewCtrl : DevExpress.XtraEditors.XtraUserControl
|
{
|
public XhsProjectBasicInfoViewCtrl()
|
{
|
InitializeComponent();
|
this.layoutControl1.SetupLayoutControl();
|
}
|
|
private Lazy<HStation.BLL.XhsProject> _bll = new(() => new HStation.BLL.XhsProject());
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
public async void SetBindingData(long projectId)
|
{
|
var project = await _bll.Value.GetByID(projectId);
|
this.txtName.EditValue = project.Name;
|
this.txtNO.EditValue = project.NO;
|
this.txtCustomer.EditValue = project.Customer;
|
this.txtAddress.EditValue = project.Address;
|
this.txtFlags.EditValue = Yw.Untity.FlagsHelper.ToString(project.Flags);
|
this.txtTagNme.EditValue = project.TagName;
|
this.txtDescription.EditValue = project.Description;
|
|
}
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
public void SetBindingData(XhsProjectDto project)
|
{
|
this.txtName.EditValue = project.Name;
|
this.txtNO.EditValue = project.NO;
|
this.txtCustomer.EditValue = project.Customer;
|
this.txtAddress.EditValue = project.Address;
|
this.txtFlags.EditValue = Yw.Untity.FlagsHelper.ToString(project.Flags);
|
this.txtTagNme.EditValue = project.TagName;
|
this.txtDescription.EditValue = project.Description;
|
}
|
|
}
|
}
|