public ManagersManagementWindow() { InitializeComponent(); Title = "Добавить менеджера"; curManager = new manager(); newManager = new manager(); }
public ManagersManagementWindow(manager m) { InitializeComponent(); curManager = m; IsEdit = true; Title = "Изменить менеджера"; PControl.SetPerson(m.person); newManager = new manager(); }
/// <summary> /// Deprecated Method for adding a new object to the managers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTomanagers(manager manager) { base.AddObject("managers", manager); }
/// <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; }
public void DeleteManager(manager m) { CheckConnection(); try { lock (locker) { DeletePerson(m.person); db.SaveChanges(); } } catch (Exception ex) { throw new DBException(ErrorTypes.UnexpectedException, ex); } }
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); } }