Beispiel #1
0
 public Staff(string btnName, string IDChange)
 {
     InitializeComponent();
     button1.Text = btnName;
     IDPerson = IDChange;
     this.ControlBox = false;
     switch (button1.Text)
     {
         case "Изменить":
             tabDiplom.Parent = tabControl2;
             tabFamily.Parent = tabControl2;
             tabHolyDay.Parent = tabControl2;
             tabIle.Parent = tabControl2;
             person = new Person(IDPerson);
             setInfoPerson(person);
             dataGridView0.DataSource = FillDGV("*", "Диплом", "[Код сотрудника] = " + IDPerson);
             dataGridView1.DataSource = FillDGV("*", "[Состав семьи]", "[Код сотрудника] = " + IDPerson);
             dataGridView2.DataSource = FillDGV("*", "Отпуска", "[Код сотрудника] = " + IDPerson);
             dataGridView3.DataSource = FillDGV("*", "Больничные", "[Код сотрудника] = " + IDPerson);
             break;
     }
 }
Beispiel #2
0
        private void setInfoPerson(Person person)
        {
            TreeOfFamily.Text = "";
            FIO.Text = "";
            BirthDayOfFamily.Text = "";

            DateOfBegining.Text = "";
            DateOfEnd.Text = "";
            NumberOfLaw.Text = "";
            DateOfIle.Text = "";
            DaysOfIle.Text = "";
            //Значение чекбокса
            LastName.Text = person.getLastName();
            Name.Text = person.getName();
            MoreName.Text = person.getMoreName();
            BirthDay.Text = person.getBirthDay();
            NumberContract.Text = person.getNumberContract().ToString();
            Merry.Text = person.getMerry();
            WorkDate.Text = person.getWorkDate();
            Gender.Text = person.getGender();
            Adress.Text = person.getAdress();
            HaveAHome.Text = person.getHaveAHome();
            SerialPass.Text = person.getSeriaOfPass().ToString();
            NumberPass1.Text = person.getNumberPass1().ToString();
            DatePass.Text = person.getDatePass();
            PlaceOfBirth.Text = person.getPlaceOfBirth();
            IDPass.Text = person.getIDPass().ToString();
            WhoGivePass.Text = person.getWhoGivePass();
            Citizen.Text = person.getCitizen();
            INN.Text = person.getINN().ToString();
            InshuranceNumber.Text = person.getInshuranceNumber().ToString();
            MedicCardNumber.Text = person.getMedicCardNumber().ToString();
            Departament.Text = person.getDepartment();
            Occupation.Text = person.getOccupation();
            Sector.Text = person.getSector();
            Sailary.Text = person.getSailary().ToString();
            MaxBonuseMoney.Text = person.getMaxBonuseMoney().ToString();
            HomeTel.Text = person.getHomeTele().ToString();
            workTel.Text = person.getworkTele().ToString();
            MobTel.Text = person.getMobTele().ToString();
            Exp.Text = person.getExp();
        }