private void OnSaveClickCommand() { try { if (!_modelTrain.IsBusy) { if (CheckInputData()) { IsLoading = true; ItemEdit.MaKhoa = MaKhoa; ItemEdit.TenKhoa = TenKhoa; ItemEdit.Loai = _selectedType.TypeID; if (ParentID > 0) { ItemEdit.ParentID = ParentID; } else { ItemEdit.ParentID = null; } _modelTrain.SaveDepartmentAsync(ItemEdit); } } } catch (Exception ex) { MessageCustomize.Show(ex.Message); } }