Example #1
0
        private DateTime startDateTime; // mandatory for an appointment

        #endregion Fields

        #region Constructors

        public Form1()
        {
            InitializeComponent();

            i = 0;

            // Appointment
            currentPlan = new Plan();

            // Resource
            currentPlanResource = new Apartment();
            apartmentId = 0;
            apartmentCaption = String.Empty;

            // Binding data source
            lstPlans = new BindingList<Plan>();
            lstResources = new BindingList<Apartment>();

            // Assignments
            bdsPlans.DataSource = lstPlans;
            bdsApartments.DataSource = lstResources;
            schedulerStorage1.Appointments.DataSource = bdsPlans;
            schedulerStorage1.Resources.DataSource = bdsApartments;

            // Mappings
            InitSchedulerAppointmentMappings();
            InitSchedulerResourceMappings();
            InitSchedulerAppearence();
        }
Example #2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            currentPlan = new Plan();
            currentPlan.Start = DateTime.Now.AddHours(i);
            currentPlan.End = DateTime.Now.AddHours(i + 0.5);
            currentPlan.Subject = "Subject " + i.ToString();
            currentPlan.Description = "Description " + i.ToString();
            currentPlan.ResourceId = 0;
            lstPlans.Add(currentPlan);

            i += 2;
        }