public void TesisStart()
        {
            tesisIndice        = null;
            unaTesis.PosActual = 0;
            TesisDto tesis = unaTesis.ListaTesis[unaTesis.PosActual];

            this.LoadCompleteTesis(tesis);

            unaTesis.LblContador.Content = String.Format("     {0} / {1}", (unaTesis.PosActual + 1), unaTesis.ListaTesis.Count);
        }
        public void NoPertinente()
        {
            new TerminosModel().UpdatePertinencia(unaTesis.terminoSeleccionado, tesisMostrada.Ius, false);

            TesisDto tesisDel = (from n in unaTesis.terminoSeleccionado.Tesis
                                 where n.Ius == tesisMostrada.Ius
                                 select n).ToList()[0] as TesisDto;

            unaTesis.terminoSeleccionado.Tesis.Remove(tesisDel);
        }
        public void TesisEnd()
        {
            tesisIndice = null;

            unaTesis.PosActual = unaTesis.ListaTesis.Count - 1;
            TesisDto tesis = unaTesis.ListaTesis[unaTesis.PosActual];

            //unaTesisModel.DbConnectionOpen();
            this.LoadCompleteTesis(tesis);
            //unaTesisModel.DbConnectionClose();
            unaTesis.LblContador.Content = String.Format("     {0} / {1}", (unaTesis.PosActual + 1), unaTesis.ListaTesis.Count);
        }
        public void TesisPrevious()
        {
            tesisIndice = null;
            if (unaTesis.PosActual > 0)
            {
                unaTesis.PosActual--;
                TesisDto tesis = unaTesis.ListaTesis[unaTesis.PosActual];
                this.LoadCompleteTesis(tesis);

                unaTesis.LblContador.Content = String.Format("     {0} / {1}", (unaTesis.PosActual + 1), unaTesis.ListaTesis.Count);
            }
        }
        private void LoadCompleteTesis(TesisDto tesisBuscar)
        {
            unaTesis.flowDoc.Blocks.Clear();
            tesisMostrada = new TesisDtoModel().GetTesis(tesisBuscar.Ius);

            LoadTesis();
            HighlihtText(unaTesis.terminoSeleccionado.Termino.ToLower());
            HighlihtText(unaTesis.terminoSeleccionado.Termino.ToUpper());
            HighlihtText(unaTesis.terminoSeleccionado.Termino);

            string prueba = new MateriaConverter().Convert(tesisMostrada.Materia1, null, null, null).ToString();

            unaTesis.DataContext = tesisMostrada;
        }
예제 #6
0
        public ObservableCollection <TesisDto> GetDetalleTesisRel(List <int> iuses)
        {
            string sSql;

            ObservableCollection <TesisDto> listaTesis = new ObservableCollection <TesisDto>();

            List <string> iusString = iuses.ConvertAll <string>(x => x.ToString());

            string numsIus = string.Join(",", iusString.ToArray());


            SqlCommand    cmd;
            SqlDataReader reader;
            SqlConnection connection = new SqlConnection(connectionSql);

            try
            {
                connection.Open();

                sSql   = String.Format("SELECT IUS,Rubro FROM Tesis WHERE IUS In ({0}) ORDER BY ConsecIndx", numsIus);
                cmd    = new SqlCommand(sSql, connection);
                reader = cmd.ExecuteReader();

                while (reader.Read())
                {
                    TesisDto tesisDto = new TesisDto()
                    {
                        Ius = Convert.ToInt32(reader["ius"]), Rubro = reader["rubro"].ToString()
                    };

                    listaTesis.Add(tesisDto);
                }
            }
            catch (SqlException ex)
            {
                string methodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
                ErrorUtilities.SetNewErrorMessage(ex, methodName + " Exception,AccesoModel", "BusquedaLatinos");
            }
            catch (Exception ex)
            {
                string methodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
                ErrorUtilities.SetNewErrorMessage(ex, methodName + " Exception,AccesoModel", "BusquedaLatinos");
            }
            finally
            {
                connection.Close();
            }

            return(listaTesis);
        }
 public UnaTesisWinController(UnaTesisWin unaTesis, TesisDto tesisIndice)
 {
     this.unaTesis    = unaTesis;
     this.tesisIndice = tesisIndice;
     LoadCompleteTesis(tesisIndice);
 }
예제 #8
0
 private void GTesis_SelectionChanged(object sender, SelectionChangeEventArgs e)
 {
     selectedTesis = GTesis.SelectedItem as TesisDto;
 }