public object Clone() { PeopleWithDepartmentAndClassView person = (PeopleWithDepartmentAndClassView)this.MemberwiseClone(); person.NeedsPersist = false; return(person); }
public override bool Equals(Object obj) { // Check for null values and compare run-time types. if (obj == null || GetType() != obj.GetType()) { return(false); } PeopleWithDepartmentAndClassView p = (PeopleWithDepartmentAndClassView)obj; return(PersonId == p.PersonId); }
public void EndEdit() { if (editing) { editing = false; copy = null; if (ItemEndEdit != null) { ItemEndEdit(this); } } }
public void BeginEdit() { if (!editing) { editing = true; if (null == copy) { copy = new PeopleWithDepartmentAndClassView(); } copy = this.MemberwiseClone() as PeopleWithDepartmentAndClassView; } }
public void CopyFrom(PeopleWithDepartmentAndClassView person) { if (person != null) { this.ClassId = person.ClassId; this.ClassName = person.ClassName; this.ClassRole = person.ClassRole; this.DepartmentId = person.DepartmentId; this.DepartmentName = person.DepartmentName; this.FamilyId = person.FamilyId; this.FamilyRole = person.FamilyRole; this.FirstName = person.FirstName; this.LastName = person.LastName; this.PersonId = person.PersonId; this.PhoneNumber = person.PhoneNumber; this.SecurityCode = person.SecurityCode; this.SpecialConditions = person.SpecialConditions; this.NeedsPersist = false; } }