コード例 #1
0
        /// <summary>
        /// Traduce los argumentos seleccionados del GroupBox filtro a un diccionario
        /// </summary>
        /// <returns>Arguementos para filtrar los Elementos a mostrar</returns>
        private Dictionary <Type, Object> ArgumentosSelccionados()
        {
            Dictionary <Type, object> argumentos = new Dictionary <Type, object>();
            string nombre = "";

            if (this.checkBox_Nombre.Checked)
            {
                nombre = this.textBox_Nombre.Text;
            }
            argumentos.Add(nombre.GetType(), nombre);
            if (this.checkBox_Tipo.Checked)
            {
                IFuente fuenteTipo;
                if (this.radioButton_RSS.Checked)
                {
                    fuenteTipo = new FuenteRSS();
                }
                else
                {
                    fuenteTipo = new FuenteTextoFijo();
                }
                argumentos.Add(typeof(IFuente), fuenteTipo);
            }
            if (this.checkBox_RangoFechas.Checked)
            {
                RangoFecha pRangoFecha = new RangoFecha()
                {
                    FechaInicio = this.dateTimePicker_FechaDesde.Value,
                    FechaFin    = this.dateTimePicker_FechaHasta.Value
                };
                argumentos.Add(pRangoFecha.GetType(), pRangoFecha);
            }
            return(argumentos);
        }
コード例 #2
0
ファイル: Form_Campaña.cs プロジェクト: ramarivera/ISW-2016
        /// <summary>
        /// Devuelve los argumentos corresponientes para obtener los objetos del día de hoy
        /// </summary>
        /// <returns>Tipo de dato Dictionary que representa los argumentos para filtrar</returns>
        private Dictionary <Type, object> ArgumentosHoy()
        {
            Dictionary <Type, object> argumentos = new Dictionary <Type, object>();

            argumentos.Add(typeof(string), "");
            RangoFecha pRangoFecha = new RangoFecha()
            {
                FechaInicio = this.dateTimePicker_FechaDesde.Value,
                FechaFin    = this.dateTimePicker_FechaHasta.Value
            };

            argumentos.Add(pRangoFecha.GetType(), pRangoFecha);
            return(argumentos);
        }
コード例 #3
0
ファイル: Form_Campaña.cs プロジェクト: ramarivera/ISW-2016
        /// <summary>
        /// Traduce los argumentos seleccionados del GroupBox filtro a un diccionario
        /// </summary>
        /// <returns>Arguementos para filtrar los Elementos a mostrar</returns>
        private Dictionary <Type, Object> ArgumentosSelccionados()
        {
            Dictionary <Type, object> argumentos = new Dictionary <Type, object>();
            string nombre = "";

            if (this.checkBox_Nombre.Checked)
            {
                nombre = this.textBox_Nombre.Text;
            }
            argumentos.Add(nombre.GetType(), nombre);
            if (this.checkBox_RangoFechas.Checked)
            {
                RangoFecha pRangoFecha = new RangoFecha()
                {
                    FechaInicio = this.dateTimePicker_FechaDesde.Value,
                    FechaFin    = this.dateTimePicker_FechaHasta.Value
                };
                argumentos.Add(pRangoFecha.GetType(), pRangoFecha);
            }
            return(argumentos);
        }