Esempio n. 1
0
        private void FillArticlesData()
        {
            //Evito que se dispare el evento CheckedChange
            metroRadioButtArticulos.CheckedChanged -= metroRadioButtArticulos_CheckedChanged;
            metroRadioButtArticulos.Checked         = true;

            IniciarComponentesLibrosArticulos(true);

            string literatura = _articleServices.LiteraturaByIdDocument(_idDocument);

            SelectItemInComboBoxLiterature(literatura);

            string localitation = _articleServices.LocalitationByIdDocument(_idDocument);

            localitationMetroTextBox.Text = localitation;

            metroRadioButtArticulos.CheckedChanged += metroRadioButtTesis_CheckedChanged;
        }
Esempio n. 2
0
        void CreateForm()
        {
            InitializeListViews();
            string titulo = _datos[0];
            string year   = _datos[1];

            foreach (var val in _datos[2].Split(';').ToList())
            {
                metroListViewAutores.Items.Add(val);
            }

            KeyWordrichTextBox.Text = _datos[3];

            if (_tipoDocumento == "Tesis")
            {
                string categoria   = _tesisServices.CategoryByIdDocument(_idDocument);
                string descripcion = _tesisServices.DescripctionByIdDocument(_idDocument);
                metroLabelCategory.Text     = categoria;
                richTextBoxDescription.Text = descripcion;

                //deshabilito los labels relacionados con el campo Literatura
                metroLabel3.Enabled            = false;
                metroLabelLiterature.Enabled   = false;
                metroLabel3.ForeColor          = Color.Silver;
                metroLabelLiterature.ForeColor = Color.Silver;

                //deshabilito los labels relacionados con el campo Localizacion
                LocationMetroLabel.Enabled        = false;
                LocationValueMetroLabel.Enabled   = false;
                LocationMetroLabel.ForeColor      = Color.Silver;
                LocationValueMetroLabel.ForeColor = Color.Silver;
            }
            else if (_tipoDocumento == "Libro")
            {
                string literatura = _bookServices.LiteraturaByIdDocument(_idDocument);
                metroLabelLiterature.Text = literatura;

                //deshabilito los labels relacionados con el campo categoria
                metroLabel2.Enabled          = false;
                metroLabelCategory.Enabled   = false;
                metroLabel2.ForeColor        = Color.Silver;
                metroLabelCategory.ForeColor = Color.Silver;

                //deshabilito los labels relacionados con el campo Descripcion
                metroLabel5.Enabled              = false;
                richTextBoxDescription.Enabled   = false;
                richTextBoxDescription.BackColor = Color.Silver;
                metroLabel5.ForeColor            = Color.Silver;

                //deshabilito los labels relacionados con el campo Localizacion
                LocationMetroLabel.Enabled        = false;
                LocationValueMetroLabel.Enabled   = false;
                LocationMetroLabel.ForeColor      = Color.Silver;
                LocationValueMetroLabel.ForeColor = Color.Silver;
            }
            else
            {
                string literatura = _articleServices.LiteraturaByIdDocument(_idDocument);
                metroLabelLiterature.Text = literatura;

                LocationValueMetroLabel.Text = _articleServices.LocalitationByIdDocument(_idDocument);

                //deshabilito los labels relacionados con el campo categoria
                metroLabel2.Enabled          = false;
                metroLabelCategory.Enabled   = false;
                metroLabel2.ForeColor        = Color.Silver;
                metroLabelCategory.ForeColor = Color.Silver;

                //deshabilito los labels relacionados con el campo Descripcion
                metroLabel5.Enabled              = false;
                richTextBoxDescription.Enabled   = false;
                richTextBoxDescription.BackColor = Color.Silver;
                metroLabel5.ForeColor            = Color.Silver;
            }

            TittleMetroLabel.Text = titulo;
            metroLabelYear.Text   = year;
        }