namespace PBS.WinFrmUI
|
{
|
public partial class ShopPlaceInfoCtrl : DevExpress.XtraEditors.XtraUserControl, IPlaceInfo
|
{
|
public ShopPlaceInfoCtrl()
|
{
|
InitializeComponent();
|
}
|
|
private PlaceShopParasInfoVmo _model = null;
|
|
public void Set(string info)
|
{
|
_model = PlaceShopParasInfoVmo.ToModel(info);
|
_model ??= new();
|
this.txtAreaSquare.EditValue = _model.AreaSquare;
|
this.cbBusinessType.EditValue = _model.BusinessType;
|
this.txtFloor.EditValue = _model.Floor;
|
this.cbNature.EditValue = _model.Nature;
|
this.txtPropertyCompany.EditValue = _model.PropertyCompany;
|
this.txtPropertyRight.EditValue = _model.PropertyRight;
|
}
|
|
public bool Verify()
|
{
|
this.dxErrorProvider1.ClearErrors();
|
return true;
|
}
|
|
public string Get()
|
{
|
if (!Verify())
|
{
|
return null;
|
}
|
_model.AreaSquare = string.IsNullOrEmpty(txtAreaSquare.Text) ? null : double.Parse(txtAreaSquare.Text);
|
_model.BusinessType = cbBusinessType.Text;
|
_model.Floor = string.IsNullOrEmpty(txtFloor.Text) ? 0 : int.Parse(txtFloor.Text);
|
_model.Nature = cbNature.Text;
|
_model.PropertyCompany = txtPropertyCompany.Text;
|
_model.PropertyRight = string.IsNullOrEmpty(txtPropertyRight.Text) ? 0 : int.Parse(txtPropertyRight.Text);
|
|
return _model.ToJson();
|
}
|
|
|
|
|
|
}
|
}
|