/// <summary> ///Обновление данных сотрудника. /// </summary> /// <param name="employee">Сотрудник, данные которого следует обновить.</param> public async void Update(IEntity employee) { ID = employee.ID; Surname = (employee as IEmployee).Surname; Name = (employee as IEmployee).Name; SecondName = (employee as IEmployee).SecondName; Birthday = (employee as IEmployee).Birthday; Id_Department = (employee as IEmployee).Id_Department; Salary = (employee as IEmployee).Salary; DataServiceStub ds = new DataServiceStub(); await ds.UpdateEmployee(this); }
/// <summary> /// Удаление сотрудника. /// </summary> /// <param name="employee">Сотрудник, которого следует удалить.</param> public async void Delete(IEntity employee) { ID = employee.ID; DataServiceStub ds = new DataServiceStub(); await ds.DeleteEmployee(this); }