private async void Load(IClient client, int id, DetailInfoType type) { var res = await client.DetailInfo.GetDetailInfoAsync(id, type); var item = res.Response; if (item == null) { item = new DetailInfo(); } Editor = new BaseEditModeViewModel <DetailInfo>(item, true, container); switch (type) { case DetailInfoType.Staff: Editor.EditableObject.Staff = id; break; case DetailInfoType.Student: Editor.EditableObject.Student = id; break; } }
public DetailInfoEditorViewModel() { Editor = new BaseEditModeViewModel <DetailInfo>(); }