Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace KR2
- {
- public enum Form { ООО, ЗАО, ОАО, Unknown }
- public class Employee
- {
- private string _name;
- private string _surname;
- private string _position;
- private DateTime _work;
- public Employee(string name, string surname, string position, DateTime work)
- {
- _name = name;
- _surname = surname;
- _position = position;
- _work = work;
- }
- public Employee() : this("UnknownName", "UnknownSurname", "UnknownPosition", DateTime.Now)
- {
- }
- public DateTime Work
- {
- get
- {
- return _work;
- }
- set
- {
- _work = value;
- }
- }
- public string Name
- {
- get
- {
- return _name;
- }
- set
- {
- _name = value;
- }
- }
- public string Surname
- {
- get
- {
- return _surname;
- }
- set
- {
- _surname = value;
- }
- }
- public string Position
- {
- get
- {
- return _position;
- }
- set
- {
- _position = value;
- }
- }
- public int Year
- {
- get
- {
- return _work.Year;
- }
- set
- {
- _work = new DateTime(value, _work.Month, _work.Day);
- }
- }
- public override string ToString()
- {
- return String.Format("Имя: {0}\n Фамилия: {1}\n Должность: {2}\n Дата принятия на работу: {3}", _name, _surname, _position, _work);
- }
- public virtual string ToShortString()
- {
- return String.Format("Имя: {0}\n Фамилия: {1}", _name, _surname);
- }
- }
- public class Organisation
- {
- private string _orgname;
- private int _regnum;
- private Form _form;
- private Employee[] _emp;
- public Organisation(string orgname, int regnum, Form form)
- {
- _orgname = orgname;
- _regnum = regnum;
- _form = form;
- }
- public Organisation() : this("UnknownOrgName", Convert.ToInt32("UnknownRegNum") , Form.Unknown)
- {
- }
- public string OrgName
- {
- get
- {
- return _orgname;
- }
- set
- {
- _orgname = value;
- }
- }
- public int RegNum
- {
- get
- {
- return _regnum;
- }
- set
- {
- _regnum = value;
- }
- }
- public Form FormForm
- {
- get
- {
- return _form;
- }
- set
- {
- _form = value;
- }
- }
- public Employee[] Emp
- {
- get
- {
- return _emp;
- }
- set
- {
- _emp = value;
- }
- }
- public Employee minDate
- {
- get
- {
- return (minDate(DateTime.MinValue));
- }
- }
- // Вот до сюда я дошел
- }
- class Program
- {
- static void Main(string[] args)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement