示例#1
0
        public SelectList GetMinutos(int minuto)
        {
            var minutos = new List <Horas>();

            for (int i = 0; i <= 59; i++)
            {
                var min = new Horas
                {
                    ID   = i,
                    Hora = i.ToString("D2")
                };

                minutos.Add(min);
            }

            return(new SelectList(minutos, "ID", "Hora", minuto));
        }
示例#2
0
        public SelectList GetHoras(int hora)
        {
            var horas = new List <Horas>();

            for (int i = 0; i <= 23; i++)
            {
                var hr = new Horas
                {
                    ID   = i,
                    Hora = i.ToString("D2")
                };

                horas.Add(hr);
            }

            return(new SelectList(horas, "ID", "Hora", hora));
        }