예제 #1
0
 //не востребовано
 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);
     }
 }
예제 #2
0
 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;
 }
예제 #3
0
 //тут у нас проверка только по полям 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);
 }