namespace Yw.WinFrmUI
|
{
|
/// <summary>
|
/// 编辑模型文件
|
/// </summary>
|
public partial class EditBimfaceFileDlg : DevExpress.XtraEditors.XtraForm
|
{
|
public EditBimfaceFileDlg()
|
{
|
InitializeComponent();
|
this.layoutControl1.SetupLayoutControl();
|
}
|
|
public event Action<long> ReloadDataEvent;
|
private Yw.Dto.UpdateBimfaceFileInput _updateModel = null;
|
private Lazy<Yw.BLL.BimfaceFile> _bll = new(() => new Yw.BLL.BimfaceFile());
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
//public void SetBindingData(Model.BimFile4Update rhs)
|
//{
|
// _updateModel = rhs;
|
// this.txtName.EditValue = rhs.FileName;
|
// this.txtDescription.EditValue = rhs.Description;
|
//}
|
|
//验证
|
private bool Valid()
|
{
|
this.dxErrorProvider1.ClearErrors();
|
if (string.IsNullOrEmpty(this.txtName.Text.Trim()))
|
{
|
this.dxErrorProvider1.SetError(this.txtName, "必填项");
|
return false;
|
}
|
return true;
|
}
|
|
//确定
|
private void btnOk_Click(object sender, EventArgs e)
|
{
|
//if (!Valid())
|
// return;
|
//_updateModel.FileName = this.txtName.Text.Trim();
|
//_updateModel.Description = this.txtDescription.Text.Trim();
|
|
//if (!new BLL.BimFile().Update(_updateModel))
|
//{
|
// XtraMessageBox.Show("更新失败!");
|
// return;
|
//}
|
|
//if (this.ReloadDataEvent != null)
|
// this.ReloadDataEvent(_updateModel);
|
//this.DialogResult = DialogResult.OK;
|
//this.Close();
|
}
|
|
|
}
|
}
|