예제 #1
0
        // Search for a specific viewing with the given info
        public static DataTable SearchForViewing(ViewingSearchType type, string moviename, string customername, string categoryname, DateTime viewedon)
        {
            string sql;

            switch (type)
            {
            case ViewingSearchType.ExcludeDate:
            {
                sql = SqlProcedures.GetViewings(moviename, customername, categoryname);
                return(Call(sql));
            }

            case ViewingSearchType.IncludeDate:
            {
                sql = SqlProcedures.GetViewingsOnDate(moviename, customername, categoryname, viewedon);
                return(Call(sql));
            }
            }
            return(null);
        }