namespace PBS.WinFrmUI
|
{
|
public partial class SchoolPlaceInfoCtrl : DevExpress.XtraEditors.XtraUserControl, IPlaceInfo
|
{
|
public SchoolPlaceInfoCtrl()
|
{
|
InitializeComponent();
|
}
|
|
|
private PlaceSchoolParasInfoVmo _model = null;
|
|
public void Set(string info)
|
{
|
_model = PlaceSchoolParasInfoVmo.ToModel(info);
|
_model ??= new();
|
|
this.cbSchoolType.EditValue = _model.SchoolType;
|
this.cbLevel.EditValue = _model.Level;
|
|
}
|
|
public bool Verify()
|
{
|
this.dxErrorProvider1.ClearErrors();
|
return true;
|
}
|
|
public string Get()
|
{
|
if (!Verify())
|
{
|
return null;
|
}
|
|
_model.SchoolType = this.cbSchoolType.Text;
|
_model.Level = this.cbLevel.Text;
|
|
return _model.ToJson();
|
}
|
|
|
}
|
}
|