Exemple #1
0
        private void ReadExcel()
        {
            _excel = new AccessExcel();
            _excel.DoAccess(PathFile);
            Persons.Clear();
            listBox1.Items.Clear();

            int count = _excel.MaxRows();

            for (int i = 2; i < count; i++)
            {
                int    j = 3;
                Person p = new Person();
                p.URLPhoto         = _excel.ReadCell <string>(i, j++);
                p.URLSOGLASIE      = _excel.ReadCell <string>(i, j++);
                p.SurName          = _excel.ReadCell <string>(i, j++);
                p.Name             = _excel.ReadCell <string>(i, j++);
                p.Patronomyc       = _excel.ReadCell <string>(i, j++);
                p.Telefon          = _excel.ReadCell <string>(i, j++);
                p.Birthday         = _excel.ReadDate(i, j++);
                p.BirthdayMesto    = _excel.ReadCell <string>(i, j++);
                p.Country          = _excel.ReadCell <string>(i, j++);
                p.Addres           = _excel.ReadCell <string>(i, j++);
                p.AddresRegistry   = _excel.ReadCell <string>(i, j++);
                p.SubjectRF        = _excel.ReadCell <string>(i, j++);
                p.VK               = _excel.ReadCell <string>(i, j++);
                p.Health           = _excel.ReadCell <string>(i, j++);
                p.HealtHron        = _excel.ReadCell <string>(i, j++);
                p.VUZ              = _excel.ReadCell <string>(i, j++);
                p.VUZKor           = _excel.ReadCell <string>(i, j++);
                p.Specialnost      = _excel.ReadCell <string>(i, j++);
                p.Diplom           = _excel.ReadCell <string>(i, j++);
                p.SrBall           = _excel.ReadCellDouble(i, j++);
                p.VKR              = _excel.ReadCell <string>(i, j++);
                p.Soiskatelstvo    = _excel.ReadCell <string>(i, j++) == "Да" ? 5 : 0;
                p.Exams            = _excel.ReadCell <string>(i, j++);
                p.Statiy[0]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 5 : 0;
                p.Statiy[1]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 4 : 0;
                p.Statiy[2]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 3 : 0;
                p.Statiy[3]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 1 : 0;
                p.Statiy[4]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 1 : 0;
                p.Statiy[5]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 0.5 : 0;
                p.Statya           = _excel.ReadCell <string>(i, j++);
                p.Sience[0]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 4 : 0;
                p.Sience[1]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 4 : 0;
                p.Sience[2]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 3 : 0;
                p.Sience[3]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 3 : 0;
                p.Sience[4]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 3 : 0;
                p.Sience[5]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 2 : 0;
                p.Sience[6]        = _excel.ReadCell <string>(i, j++) == "Есть" ? 1 : 0;
                p.SienceName       = _excel.ReadCell <string>(i, j++);
                p.SienceStepen[0]  = _excel.ReadCell <string>(i, j++) == "Есть" ? 3 : 0;
                p.SienceStepen[1]  = _excel.ReadCell <string>(i, j++) == "Есть" ? 6 : 0;
                p.SienceStepen[2]  = _excel.ReadCell <string>(i, j++) == "Есть" ? 8 : 0;
                p.Work[0]          = _excel.ReadCell <string>(i, j++) == "Есть" ? 2 : 0;
                p.Work[1]          = _excel.ReadCell <string>(i, j++) == "Есть" ? 4 : 0;
                p.Work[2]          = _excel.ReadCell <string>(i, j++) == "Есть" ? 6 : 0;
                p.WorkName         = _excel.ReadCell <string>(i, j++);
                p.Sport[0]         = _excel.ReadCell <string>(i, j++) == "Есть" ? 4 : 0;
                p.Sport[1]         = _excel.ReadCell <string>(i, j++) == "Есть" ? 2 : 0;
                p.SportName        = _excel.ReadCell <string>(i, j++);
                p.Language         = _excel.ReadCell <string>(i, j++);
                p.Products         = _excel.ReadCell <string>(i, j++);
                p.Napravlenie      = _excel.ReadCell <string>(i, j++);
                p.Dopusk           = _excel.ReadCell <string>(i, j++);
                p.TattooAndPirsing = _excel.ReadCell <string>(i, j++);
                p.Rost             = _excel.ReadCellDouble(i, j++);
                p.Ves              = _excel.ReadCellDouble(i, j++);
                p.Family           = _excel.ReadCell <string>(i, j++);
                p.Info             = _excel.ReadCell <string>(i, j++);

                p.Prioritet[0] = _excel.ReadCell <string>(i, 100) == "Есть" ? 3 : 0;
                p.Prioritet[1] = _excel.ReadCell <string>(i, 101) == "Есть" ? 1 : 0;
                p.Reserv       = _excel.ReadCell <string>(i, 102) == "Резерв";
                p.Magistr      = _excel.ReadCell <string>(i, 103) == "Магистр";
                p.Bakalavr     = _excel.ReadCell <string>(i, 103) == "Бакаларв";
                p.Zachetka     = _excel.ReadCell <string>(i, 103) == "Зачетка";
                p.Ball         = p.ExecuteBall();
                listBox1.Items.Add(p);

                /* if (!string.IsNullOrWhiteSpace(p.URLPhoto))
                 * {
                 *   string id = p.URLPhoto.Split('=')[1];
                 *   DriveService service = AuthenticateOauth(idClient, "nr7vas");
                 *   Google.Apis.Drive.v2.Data.File file = new Google.Apis.Drive.v2.Data.File();
                 *   file.Id = id;
                 *   if (!Directory.Exists("images"))
                 *       Directory.CreateDirectory("images");
                 *   if (!Directory.Exists("images/photos"))
                 *       Directory.CreateDirectory("images/photos");
                 *   if (!Directory.Exists("images/soglasie"))
                 *       Directory.CreateDirectory("images/soglasie");
                 *   string filenamePhoto =
                 *       $"images/photos/{p.SurName}_{p.Name}_{p.Patronomyc}.png";
                 *   string filenameSoglasie =
                 *       $"images/soglasie/{p.SurName}_{p.Name}_{p.Patronomyc}_СОГЛАСИЕ.pdf";
                 *   DownloadFile(service, file, filenamePhoto);
                 *
                 *   using (Image image = Image.FromFile(filenamePhoto))
                 *   {
                 *       using (MemoryStream m = new MemoryStream())
                 *       {
                 *           image.Save(m, image.RawFormat);
                 *           byte[] imageBytes = m.ToArray();
                 *
                 *           p.base64PhotoString = Convert.ToBase64String(imageBytes);
                 *           p.photoPath = filenamePhoto;
                 *       }
                 *   }
                 *
                 *   string idSoglasie = p.URLSOGLASIE.Split('=')[1];
                 *   file = new Google.Apis.Drive.v2.Data.File();
                 *   file.Id = idSoglasie;
                 *   DownloadFile(service, file, filenameSoglasie);
                 *   using (Image image = Image.FromFile(filenameSoglasie))
                 *   {
                 *       using (MemoryStream m = new MemoryStream())
                 *       {
                 *           image.Save(m, image.RawFormat);
                 *           byte[] imageBytes = m.ToArray();
                 *
                 *           // Convert byte[] to Base64 String
                 *           p.base64SoglasieString = Convert.ToBase64String(imageBytes);
                 *      }
                 *   }
                 * }*/
                Persons.Add(p);
            }

            Persons.Sort(new NaturalStringComparer());
            Persons.Sort(new BallComparer());
            listBox1.Items.Clear();
            foreach (var person in Persons)
            {
                listBox1.Items.Add(person);
            }

            _excel.FinishAccess();
        }
Exemple #2
0
        private void сохранитьКакToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();

            if (saveFileDialog1.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            string filename = saveFileDialog1.FileName;

            _excel = new AccessExcel();
            _excel.DoAccess(filename);

            groupBox1.Enabled = false;
            groupBox2.Enabled = false;
            listBox1.Enabled  = true;
            changeBTN.Enabled = true;

            Persons.Sort(new NaturalStringComparer());
            Persons.Sort(new BallComparer());
            listBox1.Items.Clear();
            foreach (var person in Persons)
            {
                listBox1.Items.Add(person);
            }

            listBox1.SelectedItem = listBox1.Items.OfType <Person>().First(x => x.ID == SelectedPerson.ID);

            for (int i = 0; i < Persons.Count; i++)
            {
                _excel.WriteCell <string>(1, 1, "Дата изменения");
                int iRow = i + 2;
                var p    = Persons[i];
                int j    = 1;
                _excel.WriteCell <string>(iRow, j++, DateTime.Now.ToString("G"));
                _excel.WriteCell <string>(iRow, j++, p.email);
                _excel.WriteCell <string>(iRow, j++, p.base64PhotoString);
                _excel.WriteCell <string>(iRow, j++, p.base64SoglasieString);
                _excel.WriteCell <string>(iRow, j++, p.SurName);
                _excel.WriteCell <string>(iRow, j++, p.Name);
                _excel.WriteCell <string>(iRow, j++, p.Patronomyc);
                _excel.WriteCell <string>(iRow, j++, p.Telefon);
                _excel.WriteCell <string>(iRow, j++, p.Birthday.ToShortDateString());
                _excel.WriteCell <string>(iRow, j++, p.BirthdayMesto);
                _excel.WriteCell <string>(iRow, j++, p.Country);
                _excel.WriteCell <string>(iRow, j++, p.Addres);
                _excel.WriteCell <string>(iRow, j++, p.AddresRegistry);
                _excel.WriteCell <string>(iRow, j++, p.SubjectRF);
                _excel.WriteCell <string>(iRow, j++, p.VK);
                _excel.WriteCell <string>(iRow, j++, p.Health);
                _excel.WriteCell <string>(iRow, j++, p.HealtHron);
                _excel.WriteCell <string>(iRow, j++, p.VUZ);
                _excel.WriteCell <string>(iRow, j++, p.VUZKor);
                _excel.WriteCell <string>(iRow, j++, p.Specialnost);
                _excel.WriteCell <string>(iRow, j++, p.Diplom);
                _excel.WriteCell <double>(iRow, j++, p.SrBall);
                _excel.WriteCell <string>(iRow, j++, p.VKR);
                _excel.WriteCell <string>(iRow, j++, p.Soiskatelstvo == 0 ? "Нет" : "Да");
                _excel.WriteCell <string>(iRow, j++, p.Exams);
                _excel.WriteCell <string>(iRow, j++, p.Statiy[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[2] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[3] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[4] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[5] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statya);
                _excel.WriteCell <string>(iRow, j++, p.Sience[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[2] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[3] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[4] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[5] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[6] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.SienceName);
                _excel.WriteCell <string>(iRow, j++, p.SienceStepen[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.SienceStepen[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.SienceStepen[2] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Work[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Work[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Work[2] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.WorkName);
                _excel.WriteCell <string>(iRow, j++, p.Sport[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sport[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.SportName);
                _excel.WriteCell <string>(iRow, j++, p.Language);
                _excel.WriteCell <string>(iRow, j++, p.Products);
                _excel.WriteCell <string>(iRow, j++, p.Napravlenie);
                _excel.WriteCell <string>(iRow, j++, p.Dopusk);
                _excel.WriteCell <string>(iRow, j++, p.TattooAndPirsing);
                _excel.WriteCell <double>(iRow, j++, p.Rost);
                _excel.WriteCell <double>(iRow, j++, p.Ves);
                _excel.WriteCell <string>(iRow, j++, p.Family);
                _excel.WriteCell <string>(iRow, j++, p.Info);
                _excel.WriteCell <string>(iRow, 100, p.Prioritet[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, 101, p.Prioritet[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, 102, p.Reserv ? "Резерв" : "Основа");
                _excel.WriteCell <string>(iRow, 103, p.Magistr ? "Магистр" : p.Bakalavr ? "Бакалавр" : p.Zachetka ? "Зачетка" : "");
            }
            _excel.FinishAccess();
        }
Exemple #3
0
        /// <summary>
        /// Нажатие кнопки Сохранить
        /// </summary>
        private void button5_Click(object sender, EventArgs e)
        {
            SelectedPerson.SurName          = surnameTB.Text;
            SelectedPerson.Name             = nameTB.Text;
            SelectedPerson.Patronomyc       = patronomycTB.Text;
            SelectedPerson.Telefon          = telefonTB.Text;
            SelectedPerson.Birthday         = dateTimePicker1.Value;
            SelectedPerson.BirthdayMesto    = birthdayMestoTB.Text;
            SelectedPerson.Country          = countryTB.Text;
            SelectedPerson.Addres           = adressTB.Text;
            SelectedPerson.AddresRegistry   = adresRegTB.Text;
            SelectedPerson.SubjectRF        = subjectRFTB.Text;
            SelectedPerson.VK               = vkTB.Text;
            SelectedPerson.Health           = healthTB.Text;
            SelectedPerson.HealtHron        = healthHronTB.Text;
            SelectedPerson.VUZ              = vuzTB.Text;
            SelectedPerson.VUZKor           = vuzKor.Text;
            SelectedPerson.Specialnost      = specialnostTB.Text;
            SelectedPerson.Diplom           = diplomTB.Text;
            SelectedPerson.SrBall           = double.Parse(srBallTB.Text);
            SelectedPerson.VKR              = vkrTB.Text;
            SelectedPerson.Soiskatelstvo    = soiscatelstvoCB.Checked ? 5 : 0;
            SelectedPerson.Exams            = examsTB.Text;
            SelectedPerson.Statiy[0]        = StatiyCLB.GetItemChecked(0) ? 5 : 0;
            SelectedPerson.Statiy[1]        = StatiyCLB.GetItemChecked(1) ? 4 : 0;
            SelectedPerson.Statiy[2]        = StatiyCLB.GetItemChecked(2) ? 3 : 0;
            SelectedPerson.Statiy[3]        = StatiyCLB.GetItemChecked(3) ? 1 : 0;
            SelectedPerson.Statiy[4]        = StatiyCLB.GetItemChecked(4) ? 1 : 0;
            SelectedPerson.Statiy[5]        = StatiyCLB.GetItemChecked(5) ? 0.5 : 0;
            SelectedPerson.Statya           = statiyNameTB.Text;
            SelectedPerson.Sience[0]        = OlympCLB.GetItemChecked(0) ? 4 : 0;
            SelectedPerson.Sience[1]        = OlympCLB.GetItemChecked(1) ? 4 : 0;
            SelectedPerson.Sience[2]        = OlympCLB.GetItemChecked(2) ? 3 : 0;
            SelectedPerson.Sience[3]        = OlympCLB.GetItemChecked(3) ? 3 : 0;
            SelectedPerson.Sience[4]        = OlympCLB.GetItemChecked(4) ? 3 : 0;
            SelectedPerson.Sience[5]        = OlympCLB.GetItemChecked(5) ? 2 : 0;
            SelectedPerson.Sience[6]        = OlympCLB.GetItemChecked(6) ? 1 : 0;
            SelectedPerson.SienceName       = sienceNameTB.Text;
            SelectedPerson.SienceStepen[0]  = KandCLB.GetItemChecked(0) ? 3 : 0;
            SelectedPerson.SienceStepen[1]  = KandCLB.GetItemChecked(1) ? 6 : 0;
            SelectedPerson.SienceStepen[2]  = KandCLB.GetItemChecked(2) ? 8 : 0;
            SelectedPerson.Work[0]          = WorkCLB.GetItemChecked(0) ? 2 : 0;
            SelectedPerson.Work[1]          = WorkCLB.GetItemChecked(1) ? 4 : 0;
            SelectedPerson.Work[2]          = WorkCLB.GetItemChecked(2) ? 6 : 0;
            SelectedPerson.WorkName         = workNameTB.Text;
            SelectedPerson.Sport[0]         = SportCLB.GetItemChecked(0) ? 4 : 0;
            SelectedPerson.Sport[1]         = SportCLB.GetItemChecked(1) ? 2 : 0;
            SelectedPerson.Prioritet[0]     = PrioritetCLB.GetItemChecked(0) ? 3 : 0;
            SelectedPerson.Prioritet[1]     = PrioritetCLB.GetItemChecked(1) ? 1 : 0;
            SelectedPerson.SportName        = sportNameTB.Text;
            SelectedPerson.Language         = languageTB.Text;
            SelectedPerson.Products         = productsTB.Text;
            SelectedPerson.Napravlenie      = napravlenieTB.Text;
            SelectedPerson.Dopusk           = dopuskTB.Text;
            SelectedPerson.TattooAndPirsing = tattooAndPirsingTB.Text;
            SelectedPerson.Rost             = double.TryParse(rostTB.Text, out double result1) ? result1 : SelectedPerson.Rost;
            SelectedPerson.Ves              = double.TryParse(vesTB.Text, out double result2) ? result2 : SelectedPerson.Ves;
            SelectedPerson.Family           = familyTB.Text;
            SelectedPerson.Info             = infoTB.Text;
            SelectedPerson.Reserv           = reservCB.Checked;
            SelectedPerson.Magistr          = magCB.Checked;
            SelectedPerson.Zachetka         = ZachetCB.Checked;
            SelectedPerson.Bakalavr         = BakCB.Checked;
            SelectedPerson.Ball             = SelectedPerson.ExecuteBall();
            ball.Text = SelectedPerson.Ball.ToString();

            /*if (!SelectedPerson.OK())
             * {
             *  MessageBox.Show("Введите все данные", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             *  return;
             * }*/

            _excel = new AccessExcel();
            _excel.DoAccess(PathFile);

            groupBox1.Enabled = false;
            groupBox2.Enabled = false;
            listBox1.Enabled  = true;
            changeBTN.Enabled = true;

            Persons.Sort(new NaturalStringComparer());
            Persons.Sort(new BallComparer());
            listBox1.Items.Clear();
            foreach (var person in Persons)
            {
                listBox1.Items.Add(person);
            }

            listBox1.SelectedItem = listBox1.Items.OfType <Person>().First(x => x.ID == SelectedPerson.ID);

            for (int i = 0; i < Persons.Count; i++)
            {
                _excel.WriteCell <string>(1, 1, "Дата изменения");
                int iRow = i + 2;
                var p    = Persons[i];
                int j    = 1;
                _excel.WriteCell <string>(iRow, j++, DateTime.Now.ToString("G"));
                _excel.WriteCell <string>(iRow, j++, p.URLPhoto);
                _excel.WriteCell <string>(iRow, j++, p.URLPhoto);
                _excel.WriteCell <string>(iRow, j++, p.URLSOGLASIE);
                _excel.WriteCell <string>(iRow, j++, p.SurName);
                _excel.WriteCell <string>(iRow, j++, p.Name);
                _excel.WriteCell <string>(iRow, j++, p.Patronomyc);
                _excel.WriteCell <string>(iRow, j++, p.Telefon);
                _excel.WriteCell <string>(iRow, j++, p.Birthday.ToShortDateString());
                _excel.WriteCell <string>(iRow, j++, p.BirthdayMesto);
                _excel.WriteCell <string>(iRow, j++, p.Country);
                _excel.WriteCell <string>(iRow, j++, p.Addres);
                _excel.WriteCell <string>(iRow, j++, p.AddresRegistry);
                _excel.WriteCell <string>(iRow, j++, p.SubjectRF);
                _excel.WriteCell <string>(iRow, j++, p.VK);
                _excel.WriteCell <string>(iRow, j++, p.Health);
                _excel.WriteCell <string>(iRow, j++, p.HealtHron);
                _excel.WriteCell <string>(iRow, j++, p.VUZ);
                _excel.WriteCell <string>(iRow, j++, p.VUZKor);
                _excel.WriteCell <string>(iRow, j++, p.Specialnost);
                _excel.WriteCell <string>(iRow, j++, p.Diplom);
                _excel.WriteCell <double>(iRow, j++, p.SrBall);
                _excel.WriteCell <string>(iRow, j++, p.VKR);
                _excel.WriteCell <string>(iRow, j++, p.Soiskatelstvo == 0 ? "Нет": "Да");
                _excel.WriteCell <string>(iRow, j++, p.Exams);
                _excel.WriteCell <string>(iRow, j++, p.Statiy[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[2] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[3] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[4] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statiy[5] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Statya);
                _excel.WriteCell <string>(iRow, j++, p.Sience[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[2] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[3] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[4] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[5] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sience[6] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.SienceName);
                _excel.WriteCell <string>(iRow, j++, p.SienceStepen[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.SienceStepen[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.SienceStepen[2] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Work[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Work[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Work[2] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.WorkName);
                _excel.WriteCell <string>(iRow, j++, p.Sport[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.Sport[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, j++, p.SportName);
                _excel.WriteCell <string>(iRow, j++, p.Language);
                _excel.WriteCell <string>(iRow, j++, p.Products);
                _excel.WriteCell <string>(iRow, j++, p.Napravlenie);
                _excel.WriteCell <string>(iRow, j++, p.Dopusk);
                _excel.WriteCell <string>(iRow, j++, p.TattooAndPirsing);
                _excel.WriteCell <double>(iRow, j++, p.Rost);
                _excel.WriteCell <double>(iRow, j++, p.Ves);
                _excel.WriteCell <string>(iRow, j++, p.Family);
                _excel.WriteCell <string>(iRow, j++, p.Info);
                _excel.WriteCell <string>(iRow, 100, p.Prioritet[0] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, 101, p.Prioritet[1] == 0 ? "Нет" : "Есть");
                _excel.WriteCell <string>(iRow, 102, p.Reserv ? "Резерв" : "Основа");
                _excel.WriteCell <string>(iRow, 103, p.Magistr ? "Магистр" : p.Bakalavr ? "Бакалавр" : p.Zachetka ? "Зачетка" : "");
            }
            _excel.FinishAccess();
        }