diff --git a/.vs/WpfApp/v16/.suo b/.vs/WpfApp/v16/.suo new file mode 100644 index 0000000..417c8a0 Binary files /dev/null and b/.vs/WpfApp/v16/.suo differ diff --git a/.vs/WpfApp/v16/Server/sqlite3/db.lock b/.vs/WpfApp/v16/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/WpfApp/v16/Server/sqlite3/storage.ide b/.vs/WpfApp/v16/Server/sqlite3/storage.ide new file mode 100644 index 0000000..589ff1f Binary files /dev/null and b/.vs/WpfApp/v16/Server/sqlite3/storage.ide differ diff --git a/Empty b/Empty index 53a90bf..aa8c0c5 100644 --- a/Empty +++ b/Empty @@ -1 +1,2 @@ Empty +Empty diff --git a/WpfApp.sln b/WpfApp.sln new file mode 100644 index 0000000..07ada4c --- /dev/null +++ b/WpfApp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28803.452 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApp", "WpfApp1\WpfApp.csproj", "{F901D410-8009-4881-9243-261CCA2B8BCA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F901D410-8009-4881-9243-261CCA2B8BCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F901D410-8009-4881-9243-261CCA2B8BCA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F901D410-8009-4881-9243-261CCA2B8BCA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F901D410-8009-4881-9243-261CCA2B8BCA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {10EA9582-9F4B-419F-A6B6-44D9E32BD2E8} + EndGlobalSection +EndGlobal diff --git a/WpfApp1/App.config b/WpfApp1/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/WpfApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/WpfApp1/App.xaml b/WpfApp1/App.xaml new file mode 100644 index 0000000..2e70522 --- /dev/null +++ b/WpfApp1/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/WpfApp1/App.xaml.cs b/WpfApp1/App.xaml.cs new file mode 100644 index 0000000..16361bd --- /dev/null +++ b/WpfApp1/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace WpfApp1 +{ + /// + /// Логика взаимодействия для App.xaml + /// + public partial class App : Application + { + } +} diff --git a/WpfApp1/Department.cs b/WpfApp1/Department.cs new file mode 100644 index 0000000..f94282a --- /dev/null +++ b/WpfApp1/Department.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Collections.ObjectModel; + +namespace WpfApp1 +{ + public class Department + { + /// + /// Список рабочих в данном дипортаменте + /// + private ObservableCollection dep = new ObservableCollection(); + + /// + /// Имя департамента + /// + public string Name { get; set; } + /// + /// Возвращает список трудяг + /// + public ObservableCollection GetEmployees { get { return dep; } } + public Department() + { + + } + /// + /// Конструктор класса, с вводом имени + /// + /// Имя департамент + public Department(string Name) + { + this.Name = Name; + } + /// + /// Добавление работника в депортамент + /// + /// Работник + public void AddEmployees(Employee employee) + { + dep.Add(employee); + } + /// + /// Удаление работника из департамент + /// + /// Работник + public void RemoveEmployees(Employee employee) + { + dep.Remove(employee); + } + /// + /// Изменение парматров работнеика1 + /// + /// Работник с новыми параметрами + /// Индекс в колекции работника + public void RenameEmployees(Employee employee, int index) + { + dep[index] = null; + dep[index] = employee; + + } + /// + /// Изменение имени департамента + /// + /// Новое имя + public void Rename(string name) + { + this.Name = name; + } + + public override string ToString() + { + return $"{this.Name}"; + } + + } +} diff --git a/WpfApp1/Employee.cs b/WpfApp1/Employee.cs new file mode 100644 index 0000000..184672f --- /dev/null +++ b/WpfApp1/Employee.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WpfApp1 +{ + /// + /// Класс трудяга + /// + public class Employee + { + public Employee() + { + + } + + /// + /// Конструктор класса трудяга + /// + /// Имя трудяги + /// Возраст трдяги + /// Зарплата трудяги + + public Employee(string Name, int Age, int Salary) + { + this.Name = Name; + this.Age = Age; + this.Salary = Salary; + + } + /// + /// Имя трудяги + /// + public string Name { get;set; } + /// + /// Возраст трудяги + /// + public int Age { get; set; } + /// + /// Зарплату трудяги + /// + public int Salary { get; set; } + + /// + /// Изменение имени + /// + /// Новое имя + public void Rename(string Name) + { + this.Name = Name; + } + /// + /// Изменить возвраст + /// + /// Новый возвраст + public void ChangeAge(int Age) + { + this.Age = Age; + } + /// + /// Изменить зарплату + /// + /// Новая зарплата + public void ChangeSalary(int Salary) + { + this.Salary = Salary; + } + public override string ToString() + { + return $"{this.Name} {this.Age} {this.Salary} "; + } + + } + +} + diff --git a/WpfApp1/MainWindow.xaml b/WpfApp1/MainWindow.xaml new file mode 100644 index 0000000..843c88e --- /dev/null +++ b/WpfApp1/MainWindow.xaml @@ -0,0 +1,63 @@ + + + + + + + + + + +