/// <summary> /// Creates an instance of a Holiday object that does not move holidays. /// This is used in conjunction with adding a fixed holiday which does /// not need to be moved as the date is specifically picked for a /// specific day. /// </summary> /// <example> /// <code> /// DateTime Date = new DateTime(2006, 5, 23); /// bool singleYear = true; /// CHoliday myHoliday = new CHoliday(2, "BDay", Date, 0, eFrequency.SINGLE); /// </code> /// </example> /// Revision History /// MM/DD/YY who Version Issue# Description /// -------- --- ------- ------ --------------------------------------- /// 05/23/06 ach N/A N/A Creation of class public CHoliday(int ID, string Name, DateTime date, int index, eFrequency yearFrequency) { m_intHolidayID = ID; m_strHolidayName = Name; m_dtHolidayDate = date; if (0 == index) { m_HolidayTypeIndex = eTypeIndex.TYPE_1; } else { m_HolidayTypeIndex = eTypeIndex.TYPE_2; } m_YearFrequency = yearFrequency; m_MoveFromSat = eMoveHoliday.DONT; m_MoveFromSun = eMoveHoliday.DONT; } //CHoliday
public Frequency(string s) { switch (s) { case "Every-Fourth-Month": _frequency = eFrequency.EveryFourthMonth; break; case "Every-fourth-week": _frequency = eFrequency.EveryFourthWeek; break; case "Once": case "Annual": case "Semiannual": case "Quarterly": case "Bimonthly": case "Monthly": case "Biweekly": case "Weekly": case "Daily": try { _frequency = (eFrequency)Enum.Parse(typeof(eFrequency), s, true); } catch { _frequency = eFrequency.None; } break; default: _frequency = eFrequency.None; break; } }
public Frequency(int l, TermBase t) { eFrequency result = eFrequency.Annual; switch (t._termbase) { case TermBase.eTermBase.Days: result = eFrequency.Daily; break; case TermBase.eTermBase.Months: switch (l) { case 1: result = eFrequency.Monthly; break; case 2: result = eFrequency.Bimonthly; break; case 3: result = eFrequency.Quarterly; break; case 4: result = eFrequency.EveryFourthMonth; break; case 6: result = eFrequency.Semiannual; break; default: result = eFrequency.Semiannual; break; } break; case TermBase.eTermBase.Weeks: switch (l) { case 2: result = eFrequency.Biweekly; break; case 4: result = eFrequency.EveryFourthWeek; break; case 1: result = eFrequency.Weekly; break; default: result = eFrequency.Weekly; break; } break; case TermBase.eTermBase.Years: result = eFrequency.Annual; break; default: result = eFrequency.Once; break; } _frequency = result; }
public Frequency(eFrequency f) { _frequency = f; }
public Frequency() { _frequency = eFrequency.None; }