Ejemplo n.º 1
0
        /// <summary>
        /// Get schedules inside access level
        /// </summary>
        /// <param name="accessLvId">ID of access level include schedules</param>
        /// <returns>List of schedule</returns>
        public static List <Schedule> GetSchedules(string scheduleId)
        {
            List <Schedule> schedules = new List <Schedule>();
            DataTable       dt        = null;

            try
            {
                ServiceReference1.WSACUSoapClient client = new ServiceReference1.WSACUSoapClient();
                DataSet ds = client.AccessLevelSQry("S", scheduleId);
                dt = ds.Tables[0];
                foreach (DataRow dr in dt.Rows)
                {
                    string   Id       = dr["scheduleId"].ToString();
                    Schedule schedule = Schedule.LoadScheduleById(Id);
                    schedules.Add(schedule);
                }

                return(schedules);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }