public SignedOffersForm(Applicant applicant, EmploymentCenter center)
        {
            InitializeComponent();
            OffersSource = new BindingSource
            {
                DataSource = applicant.ConsideredOffers
            };
            OffersDG.AutoGenerateColumns = false;
            OffersDG.DataSource          = OffersSource;

            var column = new DataGridViewTextBoxColumn();

            column.DataPropertyName = "CompanyName";
            column.Name             = "Название компании";
            OffersDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Name";
            column.Name             = "Название";
            OffersDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Salary";
            column.Name             = "Зарплата";
            OffersDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "RequiredQualification";
            column.Name             = "Необходимая квалификация";
            OffersDG.Columns.Add(column);

            OffersDG.Update();
            OffersDG.Refresh();
        }
Ejemplo n.º 2
0
        public AvailableOffersForm(Applicant applicant, EmploymentCenter center)
        {
            InitializeComponent();
            Applicant    = applicant;
            OffersSource = new BindingSource
            {
                DataSource = applicant.GetWorkOffers(center).Where(offer => !applicant.ConsideredOffers.Contains(offer))
            };
            OffersDG.AutoGenerateColumns = false;
            OffersDG.AllowUserToAddRows  = false;
            OffersDG.DataSource          = OffersSource;

            DataGridViewCheckBoxColumn checkColumn = new DataGridViewCheckBoxColumn();

            checkColumn.Name = "Выбрать";
            OffersDG.Columns.Add(checkColumn);

            // Initialize and add a text box column.
            DataGridViewColumn column = new DataGridViewTextBoxColumn();

            column.DataPropertyName = "Name";
            column.Name             = "Название";
            column.ReadOnly         = true;
            OffersDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "CompanyName";
            column.Name             = "Название компании";
            column.ReadOnly         = true;
            OffersDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Salary";
            column.Name             = "Зарплата";
            column.ReadOnly         = true;
            OffersDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "RequiredQualification";
            column.Name             = "Необходимая квалификация";
            column.ReadOnly         = true;
            OffersDG.Columns.Add(column);

            OffersDG.Update();
            OffersDG.Refresh();
        }
Ejemplo n.º 3
0
        public MainForm(EmploymentCenter center)
        {
            InitializeComponent();
            Center          = center;
            ApplicantSource = new BindingSource {
                DataSource = center.Applicants
            };
            ApplicantsDG.AutoGenerateColumns = false;
            ApplicantsDG.DataSource          = ApplicantSource;
            OffersSource = new BindingSource {
                DataSource = center.AvailableOffers
            };
            OffersDG.AutoGenerateColumns = false;
            OffersDG.DataSource          = OffersSource;

            var column = new DataGridViewTextBoxColumn();

            column.DataPropertyName = "CompanyName";
            column.Name             = "Название компании";
            OffersDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Name";
            column.Name             = "Название";
            OffersDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Salary";
            column.Name             = "Зарплата";
            OffersDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "RequiredQualification";
            column.Name             = "Необходимая квалификация";
            OffersDG.Columns.Add(column);

            OffersDG.Update();
            OffersDG.Refresh();

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "FullName";
            column.Name             = "Фамилия имя";
            ApplicantsDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Experience";
            column.Name             = "Опыт работы";
            ApplicantsDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Address";
            column.Name             = "Адрес";
            ApplicantsDG.Columns.Add(column);

            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Qualification";
            column.Name             = "Квалификация";
            ApplicantsDG.Columns.Add(column);

            DataGridViewCheckBoxColumn checkColumn = new DataGridViewCheckBoxColumn();

            checkColumn.DataPropertyName = "WantOnlyQualificationWork";
            checkColumn.Name             = "Только по своей квалификации";
            ApplicantsDG.Columns.Add(checkColumn);

            ApplicantsDG.Update();
            ApplicantsDG.Refresh();

            MessageBox.Show("Тема: 'Центр занятости'\nАвтор: студент группы 18ВП1 Ключников Андрей",
                            "Информация о программе", MessageBoxButtons.OK);
        }