コード例 #1
0
ファイル: Bridge.cs プロジェクト: tyler94/CIS560Project
        // 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);
        }