public PersonViewModel(PersonContract personContract) { InitializeCommands(); if (personContract != null) { this.Address = personContract.Address; this.Birthday = personContract.Birthday; this.CellPhone = personContract.CellPhone; this.ChineseName = personContract.ChineseName; this.Email = personContract.Email; this.EnglishName = personContract.EnglishName; this.Male = personContract.Male; this.ID = personContract.ID; this.NativePlace = personContract.NativePlace; } }
/// <summary> /// 根据个人合同号获得套餐内的会议集合 /// </summary> /// <param name="dbContractContext"></param> /// <param name="perContractNumer"></param> /// <returns></returns> public async Task <List <InServicePackConferenceVM> > GetInServicePackConferenceAsync(ConCDBContext dbContractContext, PersonContract personContract) { List <InServicePackConferenceVM> list = new List <InServicePackConferenceVM>(); var dbCompanyServicePackMap = dbContractContext.CompanyServicePackMap; var dbServicePack = dbContractContext.ServicePack; var dbServicePackActivityMap = dbContractContext.ServicePackActivityMap; var companyServicePackMap = await dbCompanyServicePackMap.FirstOrDefaultAsync(x => x.CompanyServicePackId == personContract.CompanyServicePackId); if (companyServicePackMap != null) { var servicePack = dbServicePack.Where(x => x.ServicePackId == companyServicePackMap.ServicePackId); var servicePackActivityMap = dbServicePackActivityMap.Where(x => x.ServicePackId == companyServicePackMap.ServicePackId); //套餐包含的活动 list = await(from sp in servicePack join spm in servicePackActivityMap on sp.ServicePackId equals spm.ServicePackId select new InServicePackConferenceVM { ConferenceId = spm.SessionConferenceID ?? string.Empty, }).ToListAsync(); } return(list); }
public bool HasPerson(PersonContract personContract) { return(persons.Contains(personContract)); }
public void AddPerson(PersonContract personContract) { persons.Add(personContract); }
public PersonContract Get(PersonContract t) { throw new NotImplementedException(); }
/// <summary> /// Конструктор. /// Преобразует контракт данных в модель данных приложения /// </summary> /// <param name="person"></param> public Person(PersonContract person) { this.ID = person.ID; this._FIO = person.FIO; }