public static string GetAuthorOfComputer()
        {
            string author = "";

            List<string> macAddresses = GetMacAddressOfCurrentComputer();
            foreach (string macAddress in macAddresses)
            {
                SqlSelect sqlSelect = new SqlSelect(TbPeopleHardwareAddress.Name);
                sqlSelect.Like(TbPeopleHardwareAddress.MacAddress, macAddress);
                sqlSelect.RetrieveData();

                if (sqlSelect.CountOfRows == 1)
                {
                    author = sqlSelect.GetValueOfField(TbPeopleHardwareAddress.SurnameAndName).ToString();
                    break;
                }
            }

            return author != "" ? author : macAddresses[0];
        }
        private void ConstructSelectQuery(ref SqlSelect sqlSelectQuery)
        {
            if (tbGlobalSearch.Text != "")
            {
                string str = tbGlobalSearch.Text;
                sqlSelectQuery.TypeOfLogicIsAnd = false;
                sqlSelectQuery.Like(TbMaterials.MaterialId, str);
                sqlSelectQuery.Like(TbMaterials.AuthorOfRecord, str);
                sqlSelectQuery.Like(TbMaterials.Comment, str);
                sqlSelectQuery.Like(TbMaterials.ConcentrationInWafer, str);
                sqlSelectQuery.Like(TbMaterials.Corresponds, str);
                sqlSelectQuery.Like(TbMaterials.CreationDate, str);
                sqlSelectQuery.Like(TbMaterials.Ingot, str);
                sqlSelectQuery.Like(TbMaterials.LaunchedStatus, str);
                sqlSelectQuery.Like(TbMaterials.MaterialOfWafer, str);
                sqlSelectQuery.Like(TbMaterials.RecordIdOfAttachmentFile, str);
                sqlSelectQuery.Like(TbMaterials.RecordIdOfEpitStructureFile, str);
                sqlSelectQuery.Like(TbMaterials.Technology, str);
                sqlSelectQuery.Like(TbMaterials.TechProc, str);
                sqlSelectQuery.Like(TbMaterials.StructureManufacturer, str);
                sqlSelectQuery.Like(TbMaterials.ThicknessOfWafer, str);
                sqlSelectQuery.Like(TbMaterials.TypeOfWafer, str);
                sqlSelectQuery.Like(TbMaterials.VerificationStatus, str);
                sqlSelectQuery.Like(TbMaterials.WaferDiameter, str);
                sqlSelectQuery.Like(TbMaterials.WaferManufacturer, str);
                sqlSelectQuery.Like(TbMaterials.WaferResistance, str);

                return;
            }

            if (tbNumberOfParty.Text != "")
                sqlSelectQuery.Equal(TbMaterials.NumberOfParcel, tbNumberOfParty.Text);

            if (!rbDontWantWNFilter.Checked)
            {
                if (tbNumberOfWafers.Enabled)
                {
                    int x = Int32.Parse(tbNumberOfWafers.Text);
                    sqlSelectQuery.Equal(TbMaterials.NumberOfWafer, x);
                }
                if (tbNumberOfWafersStart.Enabled)
                {
                    int x1 = Int32.Parse(tbNumberOfWafersStart.Text);
                    sqlSelectQuery.MoreOrEqual(TbMaterials.NumberOfWafer, x1);
                }
                if (tbNumberOfWafersFinish.Enabled)
                {
                    int x2 = Int32.Parse(tbNumberOfWafersFinish.Text);
                    sqlSelectQuery.LessOrEqual(TbMaterials.NumberOfWafer, x2);
                }
            }

            if (!rbDontWantDateFilter.Checked)
            {
                if (dtpCreationTime.Enabled)
                    sqlSelectQuery.Equal(TbMaterials.CreationDate, dtpCreationTime.Value.Date);
                if (dtpCreationStart.Enabled)
                    sqlSelectQuery.MoreOrEqual(TbMaterials.CreationDate, dtpCreationStart.Value.Date);
                if (dtpCreationFinish.Enabled)
                    sqlSelectQuery.LessOrEqual(TbMaterials.CreationDate, dtpCreationFinish.Value.Date);
            }
            if (cbAuthorOfRecord.Text != "")
                sqlSelectQuery.Equal(TbMaterials.AuthorOfRecord, cbAuthorOfRecord.Text);
            if (cbDefinitionOfWafer.Text != "")
                sqlSelectQuery.Equal(TbMaterials.WaferManufacturer, cbDefinitionOfWafer.Text);
            if (cbTypeOfWafer.Text != "")
                sqlSelectQuery.Equal(TbMaterials.TypeOfWafer, cbTypeOfWafer.Text);
            if (cbMaterialOfWafer.Text != "")
                sqlSelectQuery.Equal(TbMaterials.MaterialOfWafer, cbMaterialOfWafer.Text);
            if (!rbDontWantConcFilter.Checked)
            {
                if (tbConcOfWafer.Enabled)
                    sqlSelectQuery.Equal(TbMaterials.ConcentrationInWafer, Double.Parse(tbConcOfWafer.Text));
                if (tbConcOfWaferStart.Enabled)
                    sqlSelectQuery.MoreOrEqual(TbMaterials.ConcentrationInWafer, Double.Parse(tbConcOfWaferStart.Text));
                if (tbConcOfWaferFinish.Enabled)
                    sqlSelectQuery.LessOrEqual(TbMaterials.ConcentrationInWafer, Double.Parse(tbConcOfWaferFinish.Text));
            }
            if (!rbDontWantWTFilter.Checked)
            {
                if (tbThicknessOfWafer.Enabled)
                {
                    double thickness = Double.Parse(tbThicknessOfWafer.Text);
                    if (cbWaferThicknessDim.Text == "нм")
                        thickness /= 1000;
                    sqlSelectQuery.Equal(TbMaterials.ThicknessOfWafer, thickness);
                }
                if (tbThicknessOfWaferStart.Enabled)
                {
                    double thickness = Double.Parse(tbThicknessOfWaferStart.Text);
                    if (cbWaferThicknessDimStart.Text == "нм")
                        thickness /= 1000;
                    sqlSelectQuery.MoreOrEqual(TbMaterials.ThicknessOfWafer, thickness);
                }
                if (tbThicknessOfWaferFinish.Enabled)
                {
                    double thickness = Double.Parse(tbThicknessOfWaferFinish.Text);
                    if (cbWaferThicknessDimFinish.Text == "нм")
                        thickness /= 1000;
                    sqlSelectQuery.LessOrEqual(TbMaterials.ThicknessOfWafer, thickness);
                }
            }
            if (!rbStatusAll.Checked)
            {
                if (rbStatusLaunched.Checked)
                    sqlSelectQuery.Equal(TbMaterials.LaunchedStatus, "YES");
                if (rbStatusNoLaunched.Checked)
                    sqlSelectQuery.Equal(TbMaterials.LaunchedStatus, "NO");
            }

            if (cbTechnology.Text != "")
            {
                sqlSelectQuery.Equal(TbMaterials.Technology, cbTechnology.Text);
            }
            if (cbTechProc.Text != "")
            {
                sqlSelectQuery.Equal(TbMaterials.TechProc, cbTechProc.Text);
            }
            if (cbManufacturer.Text != "")
            {
                sqlSelectQuery.Equal(TbMaterials.StructureManufacturer, cbManufacturer.Text);
            }
            if (tbIngot.Text != "")
            {
                sqlSelectQuery.Equal(TbMaterials.Ingot, tbIngot.Text);
            }
            if (tbCorresponds.Text != "")
            {
                sqlSelectQuery.Equal(TbMaterials.Corresponds, tbCorresponds.Text);
            }
        }