Exemplo n.º 1
0
        public static List <Event> GetEvents_calendar(int rid)
        {
            List <Event>    events = new List <Event>();
            bus_eleave_ugc1 bus    = new bus_eleave_ugc1();

            bus.id = rid;
            DataTable dt = bus.fetch_holidays();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                Event _Event = new Event();
                _Event.EventID   = int.Parse(dt.Rows[i]["event_id"].ToString());
                _Event.EventName = dt.Rows[i]["event_name"].ToString();
                _Event.EventDate = dt.Rows[i]["event_date"].ToString();
                _Event.color     = dt.Rows[i]["event_color"].ToString();
                events.Add(_Event);
            }
            return(events);
        }