public LibrariansManagementWindow(librarian m)
 {
     InitializeComponent();
     curLibrarian = m;
     IsEdit = true;
     Title = "Изменить библиотекаря";
     PControl.SetPerson(m.person);
     newLibrarian = new librarian();
 }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the librarians EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTolibrarians(librarian librarian)
 {
     base.AddObject("librarians", librarian);
 }
Пример #3
0
 /// <summary>
 /// Create a new librarian object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="personId">Initial value of the PersonId property.</param>
 public static librarian Createlibrarian(global::System.Int64 id, global::System.Int64 personId)
 {
     librarian librarian = new librarian();
     librarian.Id = id;
     librarian.PersonId = personId;
     return librarian;
 }
Пример #4
0
 public void DeleteLibrarian(librarian l)
 {
     CheckConnection();
     try
     {
         lock (locker)
         {
             DeletePerson(l.person);
             db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw new DBException(ErrorTypes.UnexpectedException, ex);
     }
 }
Пример #5
0
 public void EditLibrarian(librarian l, person p)
 {
     CheckConnection();
     try
     {
         lock (locker)
         {
             EditPerson(l.person, p.First_Name, p.Last_Name, p.Middle_Name, p.Birthday, p.H_Phone, p.M_Phone, p.Address, p.Email, p.SomeInformation, p.Photo);
             db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw new DBException(ErrorTypes.UnexpectedException, ex);
     }
 }