private static void SetupDefaultMappingsSiteMode(ASPxScheduler control)
    {
        ASPxSchedulerStorage storage = control.Storage;

        storage.BeginUpdate();
        try {
            ASPxResourceMappingInfo resourceMappings = storage.Resources.Mappings;
            resourceMappings.ResourceId = "Id";
            resourceMappings.Caption    = "Caption";

            ASPxAppointmentMappingInfo appointmentMappings = storage.Appointments.Mappings;
            appointmentMappings.AppointmentId  = "Id";
            appointmentMappings.Start          = "StartTime";
            appointmentMappings.End            = "EndTime";
            appointmentMappings.Subject        = "Subject";
            appointmentMappings.AllDay         = "AllDay";
            appointmentMappings.Description    = "Description";
            appointmentMappings.Label          = "Label";
            appointmentMappings.Location       = "Location";
            appointmentMappings.RecurrenceInfo = "RecurrenceInfo";
            appointmentMappings.ReminderInfo   = "ReminderInfo";
            appointmentMappings.ResourceId     = "OwnerId";
            appointmentMappings.Status         = "Status";
            appointmentMappings.Type           = "EventType";
        }
        finally {
            storage.EndUpdate();
        }
    }
    void SetupMappings()
    {
        ASPxAppointmentMappingInfo mappings = Storage.Appointments.Mappings;
        ASPxAppointmentCustomFieldMappingCollection customFieldMappings = Storage.Appointments.CustomFieldMappings;

        Storage.BeginUpdate();
        try {
            mappings.AppointmentId  = "Id";
            mappings.Start          = "StartTime";
            mappings.End            = "EndTime";
            mappings.Subject        = "Subject";
            mappings.AllDay         = "AllDay";
            mappings.Description    = "Description";
            mappings.Label          = "Label";
            mappings.Location       = "Location";
            mappings.RecurrenceInfo = "RecurrenceInfo";
            mappings.ReminderInfo   = "ReminderInfo";
            mappings.ResourceId     = "OwnerId";
            mappings.Status         = "Status";
            mappings.Type           = "EventType";
            customFieldMappings.Add(new AppointmentCustomFieldMapping("Field1", "Price", FieldValueType.Decimal));
        }
        finally {
            Storage.EndUpdate();
        }
    }
    void SetupMappings()
    {
        ASPxScheduler1.Storage.BeginUpdate();
        try {
            ASPxAppointmentMappingInfo aptMappings = ASPxScheduler1.Storage.Appointments.Mappings;
            aptMappings.AllDay         = "AllDay";
            aptMappings.Description    = "Description";
            aptMappings.End            = "Finish";
            aptMappings.Label          = "Label";
            aptMappings.Location       = "Location";
            aptMappings.RecurrenceInfo = "Recurrence";
            aptMappings.ReminderInfo   = "Reminder";
            aptMappings.ResourceId     = "ResourceIds";
            aptMappings.Start          = "Created";
            aptMappings.Status         = "Status";
            aptMappings.Subject        = "Subject";
            aptMappings.Type           = "AppointmentType";
            aptMappings.AppointmentId  = "Oid";
            ASPxScheduler1.Storage.Appointments.ResourceSharing = true;

            ASPxResourceMappingInfo resourceMappings = ASPxScheduler1.Storage.Resources.Mappings;
            resourceMappings.Caption    = "Name";
            resourceMappings.ResourceId = "Oid";
        }
        finally {
            ASPxScheduler1.Storage.EndUpdate();
        }
    }
    public static void SetupMappings(ASPxScheduler control)
    {
        ASPxSchedulerStorage       storage  = control.Storage;
        ASPxAppointmentMappingInfo mappings = storage.Appointments.Mappings;

        storage.BeginUpdate();
        try {
            mappings.AppointmentId  = "Id";
            mappings.Start          = "StartTime";
            mappings.End            = "EndTime";
            mappings.Subject        = "Subject";
            mappings.AllDay         = "AllDay";
            mappings.Description    = "Description";
            mappings.Label          = "Label";
            mappings.Location       = "Location";
            mappings.RecurrenceInfo = "RecurrenceInfo";
            mappings.ReminderInfo   = "ReminderInfo";
            mappings.ResourceId     = "OwnerId";
            mappings.Status         = "Status";
            mappings.Type           = "EventType";
            #region #custommappings
            storage.Appointments.CustomFieldMappings.Add
                (new ASPxAppointmentCustomFieldMapping("Field1", "Amount"));
            storage.Appointments.CustomFieldMappings.Add
                (new ASPxAppointmentCustomFieldMapping("Field2", "Memo"));
            #endregion #custommappings
        }
        finally {
            storage.EndUpdate();
        }
    }
Пример #5
0
    public static void SetupMappings(ASPxScheduler control)
    {
        ASPxSchedulerStorage       storage  = control.Storage;
        ASPxAppointmentMappingInfo mappings = storage.Appointments.Mappings;

        storage.BeginUpdate();
        try {
            mappings.AppointmentId  = "Id";
            mappings.Start          = "StartTime";
            mappings.End            = "EndTime";
            mappings.Subject        = "Subject";
            mappings.AllDay         = "AllDay";
            mappings.Description    = "Description";
            mappings.Label          = "Label";
            mappings.Location       = "Location";
            mappings.RecurrenceInfo = "RecurrenceInfo";
            mappings.ReminderInfo   = "ReminderInfo";
            mappings.ResourceId     = "OwnerId";
            mappings.Status         = "Status";
            mappings.Type           = "EventType";
        }
        finally {
            storage.EndUpdate();
        }
    }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ArrayList data = new ArrayList();

            data.Add(new datasample()
            {
                Code = "PO001", Date = "19/07/2013", Department = "Phòng kế hoạch vật tư", Supplier = "Nhà cung cấp Mỹ Châu", Amount = "100000000"
            });
            data.Add(new datasample()
            {
                Code = "PO002", Date = "29/07/2013", Department = "Phòng Marketing", Supplier = "Nhà cung cấp Vĩnh Phú", Amount = "50000000"
            });
            data.Add(new datasample()
            {
                Code = "PO003", Date = "19/08/2013", Department = "Phòng Giám Đốc", Supplier = "Nhà cung cấp Vĩnh Phú", Amount = "800000000"
            });
            data.Add(new datasample()
            {
                Code = "PO004", Date = "19/07/2013", Department = "Phòng kế hoạch vật tư", Supplier = "Nhà cung cấp Mỹ Châu", Amount = "400000"
            });
            data.Add(new datasample()
            {
                Code = "PO005", Date = "19/07/2013", Department = "Phòng kế hoạch vật tư", Supplier = "Nhà cung cấp Mỹ Châu", Amount = "1000000"
            });
            data.Add(new datasample()
            {
                Code = "PO006", Date = "29/07/2013", Department = "Phòng Marketing", Supplier = "Nhà cung cấp Vĩnh Phú", Amount = "50000"
            });
            data.Add(new datasample()
            {
                Code = "PO007", Date = "19/08/2013", Department = "Phòng Giám Đốc", Supplier = "Nhà cung cấp Vĩnh Phú", Amount = "18800000000"
            });
            data.Add(new datasample()
            {
                Code = "PO008", Date = "19/07/2013", Department = "Phòng kế hoạch vật tư", Supplier = "Nhà cung cấp Mỹ Châu", Amount = "2000"
            });

            grdData.DataSource = data;
            grdData.DataBind();


            ASPxAppointmentMappingInfo mappings = Storage.Appointments.Mappings;

            Storage.BeginUpdate();
            try
            {
                mappings.AppointmentId  = "Id";
                mappings.Start          = "StartTime";
                mappings.End            = "EndTime";
                mappings.Subject        = "Subject";
                mappings.AllDay         = "AllDay";
                mappings.Description    = "Description";
                mappings.Label          = "Label";
                mappings.Location       = "Location";
                mappings.RecurrenceInfo = "RecurrenceInfo";
                mappings.ReminderInfo   = "ReminderInfo";
                mappings.ResourceId     = "OwnerId";
                mappings.Status         = "Status";
                mappings.Type           = "EventType";
            }
            finally
            {
                Storage.EndUpdate();
            }

            string[] Users     = new string[] { "Sarah Brighton", "Ryan Fischer", "Andrew Miller" };
            string[] Usernames = new string[] { "sbrighton", "rfischer", "amiller" };

            ResourceCollection resources = Storage.Resources.Items;

            Storage.BeginUpdate();
            try
            {
                int cnt = Math.Min(3, Users.Length);
                for (int i = 1; i <= cnt; i++)
                {
                    resources.Add(new Resource(Usernames[i - 1], Users[i - 1]));
                }
            }
            finally
            {
                Storage.EndUpdate();
            }


            //ASPxScheduler1.AppointmentDataSource = ObjectDataSource1;
            //ASPxScheduler1.DataBind();
        }