/// <summary> /// /// </summary> /// <param name="PartInDB"></param> /// <returns></returns> public void CopyPartToDB(participations PartInDB, enSecondColNameType SecondColNameType) { PartInDB.init_grade = GradeInEnum == enGrade.None ? null : (byte?)GradeInEnum; switch (SecondColNameType) { case enSecondColNameType.Coach: PartInDB.team = null; PartInDB.coach = GlobalDefines.GetCoachId(SecondCol, true); break; case enSecondColNameType.Team: default: // по умолчанию будет "команда" PartInDB.coach = null; PartInDB.team = GlobalDefines.GetTeamId(SecondCol, true); break; } }
public override void RefreshFrom(ICanRefreshFrom rhs, bool SkipNullsForObjects, bool SkipNullsForNullables) { base.RefreshFrom(rhs, SkipNullsForObjects, SkipNullsForNullables); CMemberAndPart rhsMemberAndPart = rhs as CMemberAndPart; if (rhsMemberAndPart == null) { return; } if (!SkipNullsForObjects || rhsMemberAndPart.Member != null) { Member = rhsMemberAndPart.Member; } if (!SkipNullsForObjects || rhsMemberAndPart.Participation != null) { Participation = rhsMemberAndPart.Participation; } }
public CMemberAndPart(members member, participations participation) { Member = member; Participation = participation; }