示例#1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            appointmentDiv.Style.Value      = Items.AppointmentStyle.GetStyleAttributes(Page).Value;
            horizontalSeparator.Style.Value = Items.HorizontalSeparator.Style.GetStyleAttributes(Page).Value;

            lblStartTime.ControlStyle.MergeWith(Items.StartTimeText.Style);
            lblEndTime.ControlStyle.MergeWith(Items.EndTimeText.Style);
            lblTitle.ControlStyle.MergeWith(Items.Title.Style);
            lblDescription.ControlStyle.MergeWith(Items.Description.Style);

            PrepareImageContainer();
            AppointmentStatusType type = Container.AppointmentViewInfo.Status.Type;

            if (type == AppointmentStatusType.Tentative || type == AppointmentStatusType.WorkingElsewhere)
            {
                SetStatusImage();
            }
            else
            {
                statusDiv.Visible = false;
                statusContainer.Controls.Add(Items.StatusControl);
            }
            LayoutAppointmentImages();
        }
示例#2
0
    protected void CreateAppointment(string subject, AppointmentStatusType statusType, int labelId)
    {
        Appointment apt = Control.Storage.CreateAppointment(AppointmentType.Normal);

        apt.Subject    = subject;
        apt.Start      = Control.SelectedInterval.Start;
        apt.End        = Control.SelectedInterval.End;
        apt.ResourceId = Control.SelectedResource.Id;
        apt.StatusId   = (int)statusType;
        apt.LabelId    = labelId;
        Control.Storage.Appointments.Add(apt);
    }
 protected void UpdateAppointment(Appointment apt, string subject, AppointmentStatusType statusType, int labelId) {
     apt.Subject = subject;
     apt.StatusId = (int)statusType;
     apt.LabelId = labelId;
 }
 protected void CreateAppointment(string subject, AppointmentStatusType statusType, int labelId) {
     Appointment apt = Control.Storage.CreateAppointment(AppointmentType.Normal);
     apt.Subject = subject;
     apt.Start = Control.SelectedInterval.Start;
     apt.End = Control.SelectedInterval.End;
     apt.ResourceId = Control.SelectedResource.Id;
     apt.StatusId = (int)statusType;
     apt.LabelId = labelId;
     Control.Storage.Appointments.Add(apt);
 }
示例#5
0
        private static IAppointmentStatus CreateNewAppointmentStatus(IAppointmentStatusStorage storage, AppointmentStatusType type, Color color, string name, string caption)
        {
            IAppointmentStatus status = storage.CreateNewStatus(null, name, caption);

            status.Type = type;
            status.SetBrush(new SolidColorBrush(color));
            return(status);
        }