상속: INotifyPropertyChanging, INotifyPropertyChanged
예제 #1
0
        public void Register(CharityRequirement charity, IList<Technology> infrastructure, IList<Technology> support)
        {
            foreach (var inf in infrastructure)
            {
                var charityInfrastructure = new CharityRequirementTechnologiesUsed
                {
                    CharityRequirement = charity,
                    CharityRequirementId = charity.CharityRequirementId,
                    TechnologyId = inf.TechnologyID
                };
            }

            foreach (var supp in support)
            {
                var charitySupport = new CharityRequirementSupportSkill
                {
                    CharityRequirement = charity,
                     TechnologyId = supp.TechnologyID,
                     CharityRequirementId = charity.CharityRequirementId
                };

            }
            _datacontext.CharityRequirements.InsertOnSubmit(charity);
        }
 partial void DeleteCharityRequirementTechnologiesUsed(CharityRequirementTechnologiesUsed instance);
 partial void InsertCharityRequirementTechnologiesUsed(CharityRequirementTechnologiesUsed instance);
		private void detach_CharityRequirementTechnologiesUseds(CharityRequirementTechnologiesUsed entity)
		{
			this.SendPropertyChanging();
			entity.CharityRequirement = null;
		}
		private void attach_CharityRequirementTechnologiesUseds(CharityRequirementTechnologiesUsed entity)
		{
			this.SendPropertyChanging();
			entity.Technology = this;
		}