Ejemplo n.º 1
0
 public ManagersManagementWindow()
 {
     InitializeComponent();
     Title = "Добавить менеджера";
     curManager = new manager();
     newManager = new manager();
 }
Ejemplo n.º 2
0
 public ManagersManagementWindow(manager m)
 {
     InitializeComponent();
     curManager = m;
     IsEdit = true;
     Title = "Изменить менеджера";
     PControl.SetPerson(m.person);
     newManager = new manager();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the managers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTomanagers(manager manager)
 {
     base.AddObject("managers", manager);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a new manager object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="personId">Initial value of the PersonId property.</param>
 public static manager Createmanager(global::System.Int64 id, global::System.Int64 personId)
 {
     manager manager = new manager();
     manager.Id = id;
     manager.PersonId = personId;
     return manager;
 }
Ejemplo n.º 5
0
 public void DeleteManager(manager m)
 {
     CheckConnection();
     try
     {
         lock (locker)
         {
             DeletePerson(m.person);
             db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw new DBException(ErrorTypes.UnexpectedException, ex);
     }
 }
Ejemplo n.º 6
0
 public void EditManager(manager m, person p)
 {
     CheckConnection();
     try
     {
         lock (locker)
         {
             EditPerson(m.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);
     }
 }