//не востребовано public Client CheckClient(Persone persone) { using (StudentuConteiner db = new StudentuConteiner()) { try { return(db.Clients. Where(c => c.Persone.PersoneId == persone.PersoneId) .FirstOrDefault()); } catch (ArgumentNullException ex) { dialogService.ShowMessage(ex.Message); } catch (OverflowException ex) { dialogService.ShowMessage(ex.Message); } catch (System.Data.SqlClient.SqlException ex) { dialogService.ShowMessage(ex.Message); } catch (System.Data.Entity.Core.EntityCommandExecutionException ex) { dialogService.ShowMessage(ex.Message); } catch (System.Data.Entity.Core.EntityException ex) { dialogService.ShowMessage(ex.Message); } return(null); } }
public void CopyExeptVirtualIdPhoto(Persone obj1, Persone obj2) { obj1.Name = obj2.Name; obj1.Surname = obj2.Surname; obj2.Patronimic = obj2.Patronimic; obj1.NickName = obj2.NickName; obj1.Male = obj2.Male; obj1.Female = obj2.Female; }
//тут у нас проверка только по полям Name, Surname, Patronimic, Sex public bool ComparePersons(Persone obj1, Persone obj2) { if ((obj1.Name == obj2.Name) && (obj1.Surname == obj2.Surname) && (obj1.Patronimic == obj2.Patronimic) && (obj1.Male == obj2.Male) && (obj1.Female == obj2.Female) && (obj1.NickName == obj2.NickName)) { return(true); } return(false); }