Example #1
0
        private void CargarDatosDetalle(int?pIdPeriodo)
        {
            var evento = ListaEventos.Where(t => t.ID_EVENTO == pIdPeriodo).FirstOrDefault();

            if (evento != null)
            {
                txtNbEvento.Text    = evento.CL_EVENTO;
                txtDescripcion.Text = evento.DS_EVENTO;

                if (evento.CL_TIPO_CURSO == "INDIVIDUAL")
                {
                    txtTipo.Text = "Individual";
                }
                else
                {
                    txtTipo.Text = "Grupal";
                }

                rtbInicio.Text     = String.Format("{0:dd/MM/yyyy}", evento.FE_INICIO);
                rtbTermino.Text    = String.Format("{0:dd/MM/yyyy}", evento.FE_TERMINO);
                txtCurso.Text      = evento.NB_CURSO;
                txtUsuarioMod.Text = evento.CL_USUARIO_APP_MODIFICA;
                txtFechaMod.Text   = String.Format("{0:dd/MM/yyyy}", evento.FE_MODIFICA);
                rlvEventos.Rebind();
            }
        }
Example #2
0
        //LISTAR
        public List <ListaEventos> ListarEventos()
        {
            List <ListaEventos> eventos = null;
            string     listita          = "USP_LISTAR_EVENTO";
            SqlCommand comando          = new SqlCommand(listita, conexion);

            comando.CommandType = System.Data.CommandType.StoredProcedure;
            conexion.Open();
            SqlDataReader reader = comando.ExecuteReader();

            if (reader.HasRows)
            {
                eventos = new List <ListaEventos>();
                while (reader.Read())
                {
                    ListaEventos eventitos = new ListaEventos();
                    eventitos.COD_EVEN = int.Parse(reader["COD_EVEN"].ToString());
                    eventitos.NOM_EVEN = reader["NOMBRE_EVEN"].ToString();
                    eventitos.FECH_IN  = reader["FECH_INC_EVEN"].ToString();
                    eventos.Add(eventitos);
                }
            }
            conexion.Close();
            return(eventos);
        }
Example #3
0
 public Simulador(TipoFila tipoFila, double taxaChegada)
 {
     GeraFila(tipoFila);
     TAXA_CHEGADA     = taxaChegada;
     listaEventos     = new ListaEventos();
     estatisticaAtual = new Estatistica {
         Rodada = 0
     };
     listaEstatisticas    = new List <Estatistica>();
     _geradorEstatisticas = new GeradorEstatisticas();
 }
Example #4
0
        //Construtor da classe
        public Simulador(TipoFila tipoFila, double taxaChegada)
        {
            GeraFila(tipoFila);
            TAXA_CHEGADA     = taxaChegada;
            listaEventos     = new ListaEventos();
            estatisticaAtual = new Estatistica {
                Rodada = 0
            };
            listaEstatisticas    = new List <Estatistica>();
            _geradorEstatisticas = new GeradorEstatisticas();


            listaVarianciaP         = new List <double>();
            listaVarianciaT         = new List <double>();
            listaMediaTempoRodada   = new List <double>();
            listaMediaPessoasRodada = new List <double>();
        }
Example #5
0
        protected void Calendario_SelectionChanged(object sender, EventArgs e)
        {
            if (Calendario.SelectedDate.Month != Calendario.VisibleDate.Month)
            {
                Calendario.VisibleDate = Calendario.SelectedDate;
            }
            List <WebAppIntranetConsultaEventos_Result> eventos = logica.ConsultaEventos(Calendario.SelectedDate, 0, 3, 0);

            if (eventos.Count == 1)
            {
                lblTituloEvento.Text = eventos.FirstOrDefault().titulo;
                lblFechaInicio.Text  = eventos.FirstOrDefault().fecha_ini.Date.ToString("dd/MMMM/yyyy");
                lblFechaFin.Text     = eventos.FirstOrDefault().fecha_fin.Date.ToString("dd/MMMM/yyyy");
                lblTextoEvento.Text  = eventos.FirstOrDefault().texto;
                lblNumFolEvento.Text = eventos.FirstOrDefault().num_fol.ToString();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "MuestraEvento();", true);
                Calendario.SelectedDates.Remove(Calendario.SelectedDate);
            }
            else if (eventos.Count > 1)
            {
                lblSeleccionaEventoDia.Text = Calendario.SelectedDate.Date.ToString("D");
                ListaEventos.DataSource     = eventos;
                ListaEventos.DataBind();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "SeleccionaEvento();", true);
                Calendario.SelectedDates.Remove(Calendario.SelectedDate);
            }
            else
            {
                if (Session["user_cve"] != null)
                {
                    Calendario.SelectedDates.Remove(Calendario.SelectedDate);
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "MuestraNuevoEvento();", true);
                }
                else
                {
                    Calendario.SelectedDates.Remove(Calendario.SelectedDate);
                    Response.Write("<script type=\"text/javascript\">alert('No hay eventos para el dia seleccionado');window.location.href = 'Inicio.aspx';</script>");
                }
            }
        }
Example #6
0
        public Negocio.Model.Evento BuscarEvento(Negocio.Model.Unidade obj)
        {
            try
            {
                Negocio.Bo.EventoBO  boEvento  = new Negocio.Bo.EventoBO();
                Negocio.Model.Evento objEvento = boEvento.BuscarEventoMemoria(obj);
                boEvento.DeletarEventoMemoria(objEvento);
                if (objEvento == null)
                {
                    Negocio.Model.Evento retorno = new Negocio.Model.Evento();
                    retorno.Retorno = "null";
                    return(retorno);
                }
                objEvento.Retorno = "cheio";
                return(objEvento);
            }
            catch (Exception msn)
            {
                try
                {
                    ListaEventos        objLista = ListaEventos.Instancia;
                    Negocio.Model.Erros objErro  = new Negocio.Model.Erros();
                    objErro.Id      = objLista.ObjsErros.Count() + 1;
                    objErro.Texto   = msn.Message;
                    objErro.Momento = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
                    objLista.ObjsErros.Add(objErro);
                    List <Negocio.Model.Erros> objsErros = objLista.ObjsErros;
                    Negocio.ListaEventos.Instancia.ObjsEventos = new List <Negocio.Model.Evento>();
                    objLista.ObjsErros = objsErros;
                }
                catch
                {
                }

                Negocio.Model.Evento retorno = new Negocio.Model.Evento();
                retorno.Retorno = msn.Message;
                return(retorno);
            }
        }
Example #7
0
 //METODO CONSTRUTOR
 public EventoBO()
 {
     objListaEventos = ListaEventos.Instancia;
     daoEvento       = new EventoDAO();
 }