protected void scdTaskSchedule_OnDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)
        {
            try
            {
                e.Appointment.AllowDelete = false;
                e.Appointment.AllowEdit   = true;
                e.Appointment.Description = StringHtmlExtensions.TruncateHtml(e.Appointment.Description, 10000, "...");
                e.Appointment.Description = WebSiteCommon.StripHTML(e.Appointment.Description);

                if (e.Appointment.End.Date >= e.Appointment.Start.Date && e.Appointment.Start.Date < SessionManager.UserContext.LocalTime.Date)
                {
                    // past due active link
                    e.Appointment.BackColor = System.Drawing.ColorTranslator.FromHtml("#ffe6e6");  // light pink
                }
                else if (string.IsNullOrEmpty(e.Appointment.ID.ToString()))
                {
                    // inactive link
                    e.Appointment.BackColor = System.Drawing.ColorTranslator.FromHtml("#F0FFFF");   // azure
                }
                else
                {
                    // active link
                    e.Appointment.BackColor = System.Drawing.ColorTranslator.FromHtml("#FFFFE0");   // yellow
                }

                e.Appointment.End = e.Appointment.Start.AddHours(2);
            }
            catch
            {
                ;
            }
        }
        protected void scdTaskSchedule_OnDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)
        {
            e.Appointment.AllowDelete = false;
            e.Appointment.AllowEdit   = true;
            e.Appointment.Description = StringHtmlExtensions.TruncateHtml(e.Appointment.Description, 1000, "...");
            e.Appointment.Description = WebSiteCommon.StripHTML(e.Appointment.Description);

            if (e.Appointment.End.Date > e.Appointment.Start.Date && e.Appointment.Start.Date < DateTime.Now.Date)
            {
                e.Appointment.BackColor = System.Drawing.ColorTranslator.FromHtml("#ffe6e6");  // light yellow  #ffd413  #ffc013
            }
            e.Appointment.End = e.Appointment.Start.AddHours(2);
        }
示例#3
0
 protected void rptTaskStrip_OnItemCreate(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
     {
         try
         {
             TaskItem item = (TaskItem)e.Item.DataItem;
             item.Description = StringHtmlExtensions.TruncateHtml(item.Description, 1000, "...");
             item.Description = WebSiteCommon.StripHTML(item.Description);
         }
         catch
         { }
     }
 }
 protected void rptTaskStrip_OnItemCreate(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
     {
         try
         {
             TaskItem item = (TaskItem)e.Item.DataItem;
             if (item.Person != null && (item.NotifyType == TaskNotification.Escalation || item.NotifyType == TaskNotification.Delegate))
             {
                 item.Description += " (" + SQMModelMgr.FormatPersonListItem(item.Person) + ")";
             }
             item.Description = StringHtmlExtensions.TruncateHtml(item.Description, 1000, "...");
             item.Description = WebSiteCommon.StripHTML(item.Description);
         }
         catch
         { }
     }
 }