C# 클래스 CTCClassSchedule.Common.Helpers

파일 보기 프로젝트 열기: BellevueCollege/ClassSchedule

공개 메소드들

메소드 설명
BuildCourseID ( string CourseNumber, string CourseSubject, bool IsCommonCourse ) : string

ConstructDaysList ( string day_su, string day_m, string day_t, string day_w, string day_th, string day_f, string day_s ) : IList
ConstructModalityList ( string f_oncampus, string f_online, string f_hybrid ) : IList
DetermineRegistrationQuarter ( string quarter, YearQuarter currentQuarter, System.Web.Routing.RouteData routeData ) : YearQuarter

Allows user to enter "current" in URL in place of quarter

ExtractCommonFootnotes ( IEnumerable sectionBlock ) : IList

ExtractCommonFootnotes ( IList sectionBlock ) : IList

FormatWithSearchTerm ( string searchTerm, string text ) : string

Applies keyword markup to all instances of the searchTerm found in the provided text

GetCourseOutcome ( ICourseID courseId ) : dynamic

Gets the course outcome information by scraping the Bellevue College course outcomes website

GetFutureQuarters ( OdsRepository repository ) : IList

Gets the YearQuarter for the current, and future 2 quarters.

GetSectionsWithSeats ( string currentYrq, IList
sections, ClassScheduleDb db ) : IList

Common method to retrieve SectionWithSeats records

GetYearQuarterListForMenus ( OdsRepository repository ) : IList

Gets the YearQuarter for the current, and previous 3 quarters. This drives the dynamic YRQ navigation bar

GroupSectionsIntoBlocks ( IList sections, ClassScheduleDb db ) : IList

Groups a list of Sections by course, into descriptive SectionBlocks

ParseCommonHeadingLinkedSections ( List linkedSections ) : IList

StripHtml ( string withHtml, string whitelistPattern = null ) : string

SubjectWithCommonCourseFlag ( Course course ) : string
SubjectWithCommonCourseFlag ( CourseID course ) : string
SubjectWithCommonCourseFlag ( SectionWithSeats sec ) : string
addFacets ( string timestart, string timeend, string day_su, string day_m, string day_t, string day_w, string day_th, string day_f, string day_s, string f_oncampus, string f_online, string f_hybrid, string avail, string latestart, string numcredits ) : IList

returns an IList that contains all of the facet information passed into the app by the user clicking on the faceted search left pane facets accepted: flex, time, days, availability

getBodyClasses ( System.Web.HttpContextBase Context ) : string
getBookstoreBooksLink ( IList linkedSections ) : string
getCourseIdFromString ( string courseId ) : CourseID
getFacetInfo ( string fieldID, string fieldTitle, string fieldValue ) : GeneralFacetInfo

getFriendlyDayRange ( string dayString ) : string
getFriendlyTime ( System.DateTime theDate ) : string

Returns a friendly time in sentance form given a datetime. This value is create by subtracting the input datetime from the current datetime. example: 6/8/2011 07:23:123 -> about 4 hours ago

getLinkParams ( System.Web.HttpRequestBase httpRequest ) : object>.IDictionary

Gets the current http get/post params and assigns them to an IDictionary This is mainly used to set a Viewbag variable so these can be passed into action links in the views.

getProfileURL ( string SID ) : String
getShortNameFormat ( string fullName ) : string

Take a full name and converts it to a short format, with the last name and first initial of the first name (e.g. ANDREW CRASWELL -> CRASWELL A).

isAdmin ( System.Web.HttpContextBase Context ) : bool

isEditor ( System.Web.HttpContextBase Context ) : bool

비공개 메소드들

메소드 설명
SubjectWithCommonCourseFlag ( string subject, bool isCommonCourse ) : string
getHourAndMinuteFromString ( string time, int &hour, int &minute, DefaultTimeResult defaultResultMode = DefaultTimeResult.StartTime ) : void

Takes a string that represents a time (ie "6:45pm") and outputs the parsed hour and minute integers based on a 24 hour clock. If a time cannot be parsed, the output defaults to either 12am or 11:59pm depending on the time default parameter passed

getYRQValueForBookstoreURL ( YearQuarter yrq ) : string

메소드 상세

BuildCourseID() 공개 정적인 메소드

public static BuildCourseID ( string CourseNumber, string CourseSubject, bool IsCommonCourse ) : string
CourseNumber string
CourseSubject string
IsCommonCourse bool
리턴 string

ConstructDaysList() 공개 정적인 메소드

public static ConstructDaysList ( string day_su, string day_m, string day_t, string day_w, string day_th, string day_f, string day_s ) : IList
day_su string
day_m string
day_t string
day_w string
day_th string
day_f string
day_s string
리턴 IList

ConstructModalityList() 공개 정적인 메소드

public static ConstructModalityList ( string f_oncampus, string f_online, string f_hybrid ) : IList
f_oncampus string
f_online string
f_hybrid string
리턴 IList

DetermineRegistrationQuarter() 공개 정적인 메소드

Allows user to enter "current" in URL in place of quarter
public static DetermineRegistrationQuarter ( string quarter, YearQuarter currentQuarter, System.Web.Routing.RouteData routeData ) : YearQuarter
quarter string
currentQuarter YearQuarter
routeData System.Web.Routing.RouteData
리턴 YearQuarter

ExtractCommonFootnotes() 공개 정적인 메소드

public static ExtractCommonFootnotes ( IEnumerable sectionBlock ) : IList
sectionBlock IEnumerable
리턴 IList

ExtractCommonFootnotes() 공개 정적인 메소드

public static ExtractCommonFootnotes ( IList sectionBlock ) : IList
sectionBlock IList
리턴 IList

FormatWithSearchTerm() 공개 정적인 메소드

Applies keyword markup to all instances of the searchTerm found in the provided text
public static FormatWithSearchTerm ( string searchTerm, string text ) : string
searchTerm string
text string
리턴 string

GetCourseOutcome() 공개 정적인 메소드

Gets the course outcome information by scraping the Bellevue College course outcomes website
public static GetCourseOutcome ( ICourseID courseId ) : dynamic
courseId ICourseID
리턴 dynamic

GetFutureQuarters() 공개 정적인 메소드

Gets the YearQuarter for the current, and future 2 quarters.
public static GetFutureQuarters ( OdsRepository repository ) : IList
repository OdsRepository
리턴 IList

GetSectionsWithSeats() 공개 정적인 메소드

Common method to retrieve SectionWithSeats records
public static GetSectionsWithSeats ( string currentYrq, IList
sections, ClassScheduleDb db ) : IList
currentYrq string
sections IList
db CTCClassSchedule.Models.ClassScheduleDb
리턴 IList

GetYearQuarterListForMenus() 공개 정적인 메소드

Gets the YearQuarter for the current, and previous 3 quarters. This drives the dynamic YRQ navigation bar
public static GetYearQuarterListForMenus ( OdsRepository repository ) : IList
repository OdsRepository
리턴 IList

GroupSectionsIntoBlocks() 공개 정적인 메소드

Groups a list of Sections by course, into descriptive SectionBlocks
public static GroupSectionsIntoBlocks ( IList sections, ClassScheduleDb db ) : IList
sections IList List of sections to group
db CTCClassSchedule.Models.ClassScheduleDb
리턴 IList

ParseCommonHeadingLinkedSections() 공개 정적인 메소드

public static ParseCommonHeadingLinkedSections ( List linkedSections ) : IList
linkedSections List
리턴 IList

StripHtml() 공개 정적인 메소드

public static StripHtml ( string withHtml, string whitelistPattern = null ) : string
withHtml string
whitelistPattern string
리턴 string

SubjectWithCommonCourseFlag() 공개 정적인 메소드

public static SubjectWithCommonCourseFlag ( Course course ) : string
course Course
리턴 string

SubjectWithCommonCourseFlag() 공개 정적인 메소드

public static SubjectWithCommonCourseFlag ( CourseID course ) : string
course CourseID
리턴 string

SubjectWithCommonCourseFlag() 공개 정적인 메소드

public static SubjectWithCommonCourseFlag ( SectionWithSeats sec ) : string
sec CTCClassSchedule.Models.SectionWithSeats
리턴 string

addFacets() 공개 정적인 메소드

returns an IList that contains all of the facet information passed into the app by the user clicking on the faceted search left pane facets accepted: flex, time, days, availability
public static addFacets ( string timestart, string timeend, string day_su, string day_m, string day_t, string day_w, string day_th, string day_f, string day_s, string f_oncampus, string f_online, string f_hybrid, string avail, string latestart, string numcredits ) : IList
timestart string
timeend string
day_su string
day_m string
day_t string
day_w string
day_th string
day_f string
day_s string
f_oncampus string
f_online string
f_hybrid string
avail string
latestart string
numcredits string
리턴 IList

getBodyClasses() 공개 정적인 메소드

public static getBodyClasses ( System.Web.HttpContextBase Context ) : string
Context System.Web.HttpContextBase
리턴 string

getBookstoreBooksLink() 공개 정적인 메소드

public static getBookstoreBooksLink ( IList linkedSections ) : string
linkedSections IList
리턴 string

getCourseIdFromString() 공개 정적인 메소드

public static getCourseIdFromString ( string courseId ) : CourseID
courseId string
리턴 CourseID

getFacetInfo() 공개 정적인 메소드

public static getFacetInfo ( string fieldID, string fieldTitle, string fieldValue ) : GeneralFacetInfo
fieldID string
fieldTitle string
fieldValue string
리턴 GeneralFacetInfo

getFriendlyDayRange() 공개 정적인 메소드

public static getFriendlyDayRange ( string dayString ) : string
dayString string
리턴 string

getFriendlyTime() 공개 정적인 메소드

Returns a friendly time in sentance form given a datetime. This value is create by subtracting the input datetime from the current datetime. example: 6/8/2011 07:23:123 -> about 4 hours ago
public static getFriendlyTime ( System.DateTime theDate ) : string
theDate System.DateTime
리턴 string

getLinkParams() 공개 정적인 메소드

Gets the current http get/post params and assigns them to an IDictionary This is mainly used to set a Viewbag variable so these can be passed into action links in the views.
public static getLinkParams ( System.Web.HttpRequestBase httpRequest ) : object>.IDictionary
httpRequest System.Web.HttpRequestBase
리턴 object>.IDictionary

getProfileURL() 공개 정적인 메소드

public static getProfileURL ( string SID ) : String
SID string
리턴 String

getShortNameFormat() 공개 정적인 메소드

Take a full name and converts it to a short format, with the last name and first initial of the first name (e.g. ANDREW CRASWELL -> CRASWELL A).
public static getShortNameFormat ( string fullName ) : string
fullName string The full name to be converted.
리턴 string

isAdmin() 공개 정적인 메소드

public static isAdmin ( System.Web.HttpContextBase Context ) : bool
Context System.Web.HttpContextBase
리턴 bool

isEditor() 공개 정적인 메소드

public static isEditor ( System.Web.HttpContextBase Context ) : bool
Context System.Web.HttpContextBase
리턴 bool