Пример #1
0
        public override void Fill(System.Data.IDataReader dr)
        {
            base.FillInternal(dr);

            _KeyID    = Null.SetNullInteger(dr["KeyID"]);
            _PortalID = Null.SetNullInteger(dr["PortalID"]);
            if (!(Convert.IsDBNull(dr["Months"])))
            {
                _Months = new MonthArray(Convert.ToInt16(dr["Months"]));
            }
            else
            {
                _Months = MonthArray.Null;
            }
            if (!(Convert.IsDBNull(dr["Days"])))
            {
                _Days = new DayArray(Convert.ToInt32(dr["Days"]));
            }
            else
            {
                _Days = DayArray.Null;
            }
            if (!(Convert.IsDBNull(dr["DaysofWeek"])))
            {
                _DaysofWeek = new DayofWeekArray(Convert.ToByte(dr["DaysofWeek"]));
            }
            else
            {
                _DaysofWeek = DayofWeekArray.Null;
            }
            string currentYear = DateTime.Now.Year.ToString();

            if (!(Convert.IsDBNull(dr["StartDate"])))
            {
                _StartDate = new DateInteger(Convert.ToInt32(dr["StartDate"]));
            }
            if (!(Convert.IsDBNull(dr["EndDate"])))
            {
                _EndDate = new DateInteger(Convert.ToInt32(dr["EndDate"]));
            }
            if (!(Convert.IsDBNull(dr["StartTime"])))
            {
                _StartTime = Convert.ToInt32(dr["StartTime"]);
            }
            if (!(Convert.IsDBNull(dr["EndTime"])))
            {
                _EndTime = Convert.ToInt32(dr["EndTime"]);
            }
            _CategoryID           = Null.SetNullInteger(dr["CategoryID"]);
            _Category             = Null.SetNullString(dr["Category"]);
            _GroupID              = Null.SetNullInteger(dr["GroupID"]);
            _GroupName            = Null.SetNullString(dr["GroupName"]);
            _ProfilePropertyValue = Null.SetNullString(dr["ProfilePropertyValue"]);
            _Disabled             = Null.SetNullBoolean(dr["Disabled"]);
            _Title          = Null.SetNullString(dr["Title"]);
            _DesktopHTML    = Null.SetNullString(dr["DesktopHTML"]);
            _DesktopSummary = Null.SetNullString(dr["DesktopSummary"]);
        }
Пример #2
0
 private object GetNullMonthArray(MonthArray value, bool TreatAllorEmptyAsNull)
 {
     if (value.IsNull || (TreatAllorEmptyAsNull && (value.IsAllMonths || value.IsEmpty)))
     {
         return(DBNull.Value);
     }
     else
     {
         return(value.Value);
     }
 }
Пример #3
0
 public override void UpdateContent(int KeyID, int ModuleID, int PortalID, int ContentItemID, MonthArray Months, DayArray Days, DayofWeekArray DaysofWeek, DateInteger StartDate, DateInteger EndDate, int StartTime, int EndTime, int CategoryID, int GroupID, string ProfilePropertyValue, bool Disabled, string Title, string DesktopHtml, string DesktopSummary, int UserID)
 {
     SqlHelper.ExecuteNonQuery(ConnectionString, GetFullyQualifiedName("UpdateContent"), KeyID, ModuleID, PortalID, GetNull(ContentItemID), GetNullMonthArray(Months), GetNullDayArray(Days), GetNullDayofWeekArray(DaysofWeek), GetNullDateInteger(StartDate), GetNullDateInteger(EndDate), GetNullTime(StartTime), GetNullTime(EndTime), GetNull(CategoryID), GetNull(GroupID), GetNull(ProfilePropertyValue), Disabled, GetNull(Title), DesktopHtml, GetNull(DesktopSummary), UserID);
 }
Пример #4
0
 public override int AddContent(int ModuleID, int PortalID, MonthArray Months, DayArray Days, DayofWeekArray DaysofWeek, DateInteger StartDate, DateInteger EndDate, int StartTime, int EndTime, int CategoryID, int GroupID, string ProfilePropertyValue, bool Disabled, string Title, string DesktopHtml, string DesktopSummary, int UserID)
 {
     return(Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, GetFullyQualifiedName("AddContent"), ModuleID, PortalID, GetNullMonthArray(Months), GetNullDayArray(Days), GetNullDayofWeekArray(DaysofWeek), GetNullDateInteger(StartDate), GetNullDateInteger(EndDate), GetNullTime(StartTime), GetNullTime(EndTime), GetNull(CategoryID), GetNull(GroupID), GetNull(ProfilePropertyValue), Disabled, GetNull(Title), DesktopHtml, GetNull(DesktopSummary), UserID)));
 }
Пример #5
0
 public override IDataReader FindContents(int ModuleID, MonthArray Months, DayArray Days, DayofWeekArray DaysofWeek, DateInteger StartDate, DateInteger EndDate, int StartTime, int EndTime, int CategoryID, int GroupID, string ProfilePropertyValue, bool IncludeDisabled)
 {
     return(SqlHelper.ExecuteReader(ConnectionString, GetFullyQualifiedName("FindContents"), ModuleID, GetNullMonthArray(Months, true), GetNullDayArray(Days, true), GetNullDayofWeekArray(DaysofWeek, true), GetNullDateInteger(StartDate), GetNullDateInteger(EndDate), GetNullTime(StartTime), GetNullTime(EndTime), GetNull(CategoryID), GetNull(GroupID), GetNull(ProfilePropertyValue), IncludeDisabled));
 }
Пример #6
0
 private object GetNullMonthArray(MonthArray value)
 {
     return(GetNullMonthArray(value, false));
 }
Пример #7
0
 public string GetMonthsString(MonthArray months)
 {
     return(months.ToString(CultureInfo.CurrentCulture));
 }
 public System.Collections.Generic.List <ContentDejourInfo> FindContents(int ModuleId, MonthArray Months, DayArray Days, DayofWeekArray DaysofWeek, DateInteger StartDate, DateInteger EndDate, int StartTime, int EndTime, int CategoryID, int GroupID, string ProfilePropertyValue, bool IncludeDisabled)
 {
     return(CBO.FillCollection <ContentDejourInfo>(DataProvider.Instance().FindContents(ModuleId, Months, Days, DaysofWeek, StartDate, EndDate, StartTime, EndTime, CategoryID, GroupID, ProfilePropertyValue, IncludeDisabled)));
 }
 public List <ContentDejourInfo> GetContents(int ModuleId, MonthArray Months, DayArray Days, DayofWeekArray DaysofWeek, DateInteger Today, int Time, int CategoryID, int GroupID, string ProfilePropertyValue, bool IncludeDisabled)
 {
     return(CBO.FillCollection <ContentDejourInfo>(DataProvider.Instance().GetContents(ModuleId, Months, Days, DaysofWeek, Today, Time, CategoryID, GroupID, ProfilePropertyValue, IncludeDisabled)));
 }
Пример #10
0
 public abstract void UpdateContent(int KeyID, int ModuleID, int PortalID, int ContentItemID, MonthArray Months, DayArray Days, DayofWeekArray DaysofWeek, DateInteger StartDate, DateInteger EndDate, int StartTime, int EndTime, int CategoryID, int GroupID, string ProfilePropertyValue, bool Disabled, string Title, string DesktopHtml, string DesktopSummary, int UserID);
Пример #11
0
 public abstract IDataReader FindContents(int ModuleId, MonthArray Months, DayArray Days, DayofWeekArray DaysofWeek, DateInteger StartDate, DateInteger EndDate, int StartTime, int EndTime, int CategoryID, int GroupID, string ProfilePropertyValue, bool IncludeDisabled);
Пример #12
0
 public abstract IDataReader GetContents(int ModuleId, MonthArray Months, DayArray Days, DayofWeekArray DaysofWeek, DateInteger Today, int Time, int CategoryID, int GroupID, string ProfilePropertyValue, bool IncludeDisabled);