public DisplayResultControl() { InitializeComponent(); this.SchedulerControl = this.schedulerControl1; InitHelper.InitResources(CustomResourceCollection); InitHelper.InitAppointments(CustomEventList, CustomResourceCollection); ResourceMappingInfo mappingsResource = this.schedulerStorage1.Resources.Mappings; mappingsResource.Id = "ResID"; mappingsResource.Caption = "Name"; AppointmentMappingInfo mappingsAppointment = this.schedulerStorage1.Appointments.Mappings; mappingsAppointment.Start = "StartTime"; mappingsAppointment.End = "EndTime"; mappingsAppointment.Subject = "Subject"; mappingsAppointment.AllDay = "AllDay"; mappingsAppointment.Description = "Description"; mappingsAppointment.Label = "Label"; mappingsAppointment.Location = "Location"; mappingsAppointment.RecurrenceInfo = "RecurrenceInfo"; mappingsAppointment.ReminderInfo = "ReminderInfo"; mappingsAppointment.ResourceId = "OwnerId"; mappingsAppointment.Status = "Status"; mappingsAppointment.Type = "EventType"; this.schedulerStorage1.Resources.DataSource = CustomResourceCollection; this.schedulerStorage1.Appointments.DataSource = CustomEventList; this.schedulerControl1.Start = DateTime.Now; }
private void Form1_Load(object sender, EventArgs e) { InitHelper.InitResources(CustomResourceCollection); InitHelper.InitAppointments(CustomEventList, CustomResourceCollection); ResourceMappingInfo mappingsResource = this.schedulerDataStorage1.Resources.Mappings; mappingsResource.Id = "ResID"; mappingsResource.Caption = "Name"; AppointmentMappingInfo mappingsAppointment = this.schedulerDataStorage1.Appointments.Mappings; mappingsAppointment.Start = "StartTime"; mappingsAppointment.End = "EndTime"; mappingsAppointment.Subject = "Subject"; mappingsAppointment.AllDay = "AllDay"; mappingsAppointment.Description = "Description"; mappingsAppointment.Label = "Label"; mappingsAppointment.Location = "Location"; mappingsAppointment.RecurrenceInfo = "RecurrenceInfo"; mappingsAppointment.ReminderInfo = "ReminderInfo"; mappingsAppointment.ResourceId = "OwnerId"; mappingsAppointment.Status = "Status"; mappingsAppointment.Type = "EventType"; schedulerDataStorage1.Resources.DataSource = CustomResourceCollection; schedulerDataStorage1.Appointments.DataSource = CustomEventList; schedulerControl1.GroupType = SchedulerGroupType.Resource; CreateTimeRegion(); schedulerControl1.Start = DateTime.Now; }
private void InitAppointments() { AppointmentMappingInfo aptmappings = this.schedulerStorage1.Appointments.Mappings; aptmappings.Start = "StartTime"; aptmappings.End = "EndTime"; aptmappings.Subject = "Subject"; aptmappings.AllDay = "AllDay"; aptmappings.Description = "Description"; aptmappings.Label = "Label"; aptmappings.Location = "Location"; aptmappings.RecurrenceInfo = "RecurrenceInfo"; aptmappings.ReminderInfo = "ReminderInfo"; aptmappings.Status = "Status"; aptmappings.Type = "EventType"; aptmappings.ResourceId = "ResourceID"; ResourceMappingInfo resmappings = this.schedulerStorage1.Resources.Mappings; resmappings.Id = "ResID"; resmappings.Caption = "Name"; resmappings.Color = "ResColor"; GenerateResources(3); GenerateEvents(CustomEventList); this.schedulerStorage1.Appointments.DataSource = CustomEventList; }
/// <summary> /// 计划外观 /// </summary> private void ResourceMappingInfoAppearance() { ResourceMappingInfo mappings = this.schedulerDataStorage1.Resources.Mappings; mappings.Id = "ResID"; mappings.Color = "ResColor"; mappings.Caption = "Name"; }
private void InitResources() { ResourceMappingInfo mappings = this.schedulerStorage.Resources.Mappings; mappings.Caption = "Name"; mappings.Id = "ResourceID"; DataHelper.FillResources(resources, 5); this.schedulerStorage.Resources.DataSource = resources; }
void InitResourcesMappings() { ResourceMappingInfo mappings = ASPxScheduler1.Storage.Resources.Mappings; mappings.Id = "Id"; mappings.Caption = "Name"; ASPxResourceCustomFieldMappingCollection customFieldMappings = ASPxScheduler1.Storage.Resources.CustomFieldMappings; customFieldMappings.Add(new ResourceCustomFieldMapping("ResourceImageUrl", "ResourceImageUrl")); }
private void InitResources() { ResourceMappingInfo mappings = schedulerStorageMain.Resources.Mappings; mappings.Id = "Id"; mappings.Color = "ResColor"; mappings.Caption = "Name"; // fills in the resources from the database schedulerStorageMain.Resources.DataSource = AgencyResource.GetAgencyResources(); }
private void InitResources() { ResourceMappingInfo mappings = this.schedulerStorage1.Resources.Mappings; mappings.Id = "ResID"; mappings.Caption = "Name"; CustomResourceCollection.Add(CreateCustomResource(1, "Max Fowler", Color.PowderBlue)); CustomResourceCollection.Add(CreateCustomResource(2, "Nancy Drewmore", Color.PaleVioletRed)); CustomResourceCollection.Add(CreateCustomResource(3, "Pak Jang", Color.PeachPuff)); this.schedulerStorage1.Resources.DataSource = CustomResourceCollection; }
public List <CustomResource> InitResources() { ResourceMappingInfo mappings = this.Storage.Resources.Mappings; mappings.Id = "ResID"; mappings.Caption = "Name"; mappings.Color = "ResColor"; CustomResourceCollection.Add(CreateCustomResource(1, "Max Fowler", Color.PowderBlue)); CustomResourceCollection.Add(CreateCustomResource(2, "Nancy Drewmore", Color.PaleVioletRed)); CustomResourceCollection.Add(CreateCustomResource(3, "Pak Jang", Color.PeachPuff)); return(CustomResourceCollection); }
private void AppointmentGraph_Load(object sender, EventArgs e) { DataTable dt = blag.GetAllAppointment(); if (dt.Rows.Count > 0) { schedulerStorage1.Appointments.DataSource = dt; //schedulerStorage1.Resources.DataSource = dt2; SchedulerStorage schedulerStorage = sch_appointment.Storage; ResourceMappingInfo resourceMappings = schedulerStorage.Resources.Mappings; AppointmentDependencyMappingInfo appointmentDependencyMappings = schedulerStorage.AppointmentDependencies.Mappings; AppointmentMappingInfo appointmentMappings = schedulerStorage.Appointments.Mappings; resourceMappings.Id = "appo_id"; appointmentMappings.AppointmentId = "appo_id"; appointmentMappings.Start = "start_time"; appointmentMappings.End = "end_time"; appointmentMappings.Subject = "Remarks"; appointmentMappings.Description = "Remarks"; //appointmentMappings.Location = "cat_name"; //appointmentMappings.Label = "color"; //appointmentMappings.Status = "showAs"; //appointmentMappings.AllDay = "allDay"; //appointmentMappings.ReminderInfo = "ReminderInfo"; //appointmentMappings.RecurrenceInfo = "RecurrenceInfo"; //appointmentMappings.Type = "EventType"; //appointmentMappings.ResourceId = "ResourceID"; resourceMappings.Caption = "table_no"; schedulerStorage.Appointments.CommitIdToDataSource = false; schedulerStorage.Appointments.ResourceSharing = true; sch_appointment.GroupType = SchedulerGroupType.Resource; sch_appointment.GoToDate(Convert.ToDateTime(DateTime.Now.ToShortDateString())); sch_appointment.ActiveViewType = SchedulerViewType.Day; // sch_appointment.GetNextControl // schedulerStorage.Resources.DataSource = dt; // schedulerStorage.AppointmentDependencies.DataSource = dataSet.Tables["AppointmentDependencies"]; // schedulerStorage.Appointments.DataSource = dt; schedulerStorage.AppointmentsInserted += delegate(object s, PersistentObjectsEventArgs ea) { DataTable dtAppointments = (DataTable)schedulerStorage.Appointments.DataSource; schedulerStorage.SetAppointmentId((Appointment)ea.Objects[0], Convert.ToInt32(dtAppointments.Rows[dtAppointments.Rows.Count - 1][appointmentMappings.AppointmentId])); }; } }
private void InitResources() { ResourceMappingInfo mappings = this.schedulerStorage1.Resources.Mappings; mappings.Id = "ResID"; mappings.Caption = "Name"; mappings.Image = "ResImage"; CustomResourceCollection.Add(CreateCustomResource(1, "Max Fowler", Color.PowderBlue, Assembly.GetExecutingAssembly().GetManifestResourceStream("WindowsFormsApplication1.Resources.MaxFowlerPhoto.jpg"))); CustomResourceCollection.Add(CreateCustomResource(2, "Nancy Drewmore", Color.PaleVioletRed, Assembly.GetExecutingAssembly().GetManifestResourceStream("WindowsFormsApplication1.Resources.NancyDrewmorePhoto.jpg"))); CustomResourceCollection.Add(CreateCustomResource(3, "Pak Jang", Color.PeachPuff, null)); this.schedulerStorage1.Resources.DataSource = CustomResourceCollection; }
private void BindToDataSet() { if (this.schedulerDataSet == null) { this.schedulerDataSet = new SchedulerDataSet(); this.appointmentsAdapter.Fill(this.schedulerDataSet.Appointments); ResourcesTableAdapter resourcesAdapter = new ResourcesTableAdapter(); resourcesAdapter.Fill(this.schedulerDataSet.Resources); AppointmentsResourcesTableAdapter appointmentsResourcesAdapter = new AppointmentsResourcesTableAdapter(); appointmentsResourcesAdapter.Fill(this.schedulerDataSet.AppointmentsResources); } SchedulerBindingDataSource dataSource = new SchedulerBindingDataSource(); dataSource.EventProvider.AppointmentFactory = this.radSchedulerDemo.AppointmentFactory; AppointmentMappingInfo appointmentMappingInfo = new AppointmentMappingInfo(); appointmentMappingInfo.Mappings.Add(new SchedulerMapping("Email", "Email")); appointmentMappingInfo.UniqueId = "ID"; appointmentMappingInfo.Start = "Start"; appointmentMappingInfo.End = "End"; appointmentMappingInfo.Summary = "Summary"; appointmentMappingInfo.Description = "Description"; appointmentMappingInfo.Location = "Location"; appointmentMappingInfo.BackgroundId = "BackgroundID"; appointmentMappingInfo.StatusId = "StatusID"; appointmentMappingInfo.Resources = "AppointmentsAppointmentsResources"; appointmentMappingInfo.ResourceId = "ResourceID"; appointmentMappingInfo.RecurrenceRule = "RecurrenceRule"; appointmentMappingInfo.Exceptions = "AppointmentsAppointments"; appointmentMappingInfo.MasterEventId = "ParentID"; appointmentMappingInfo.Visible = "Visible"; dataSource.EventProvider.Mapping = appointmentMappingInfo; dataSource.EventProvider.DataSource = this.schedulerDataSet.Appointments; ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo(); resourceMappingInfo.Id = "ID"; resourceMappingInfo.Name = "ResourceName"; dataSource.ResourceProvider.Mapping = resourceMappingInfo; dataSource.ResourceProvider.DataSource = this.schedulerDataSet.Resources; this.radSchedulerDemo.DataSource = dataSource; }
private void InitResources() { ResourceMappingInfo mappings = this.schedulerStorage1.Resources.Mappings; mappings.Id = "ResID"; mappings.Caption = "Name"; this.schedulerStorage1.Resources.CustomFieldMappings.Add(new ResourceCustomFieldMapping("SortOrder", "ResSortOrder", FieldValueType.String)); CustomResourceCollection.Add(CreateCustomResource(1, "Max Fowler", Color.PowderBlue, 3)); CustomResourceCollection.Add(CreateCustomResource(2, "Nancy Drewmore", Color.PaleVioletRed, 1)); CustomResourceCollection.Add(CreateCustomResource(3, "Pak Jang", Color.PeachPuff, 2)); this.schedulerStorage1.Resources.DataSource = CustomResourceCollection; }
private void InitializeRadSchedulerDataBinding() { try { //cs_sapbo sapo = new cs_sapbo(); //this.schedulerBindingDataSource1.EventProvider.DataSource = sapo.GET_CITAS(); //this.schedulerBindingDataSource1.EventProvider.DataMember = "CITAS"; //this.schedulerBindingDataSource1.ResourceProvider.DataSource = sapo.GET_SALAS(1); //this.schedulerBindingDataSource1.ResourceProvider.DataMember = "SALAS"; //sapo = null; // fill all three tables citasTableAdapter1.Fill(this.schedulerDataDataSet.CITAS); salasTableAdapter1.Fill(this.schedulerDataDataSet.SALAS); cita1TableAdapter1.Fill(this.schedulerDataDataSet.CITA1); AppointmentMappingInfo appointmentMappingInfo = new AppointmentMappingInfo(); appointmentMappingInfo.Start = "Start"; appointmentMappingInfo.End = "End"; appointmentMappingInfo.Summary = "PatientName"; appointmentMappingInfo.Description = "Description"; appointmentMappingInfo.Location = "Location"; appointmentMappingInfo.BackgroundId = "BackgroundID"; appointmentMappingInfo.StatusId = "StatusID"; appointmentMappingInfo.RecurrenceRule = "RecurrenceRule"; appointmentMappingInfo.UniqueId = "DocEntry"; appointmentMappingInfo.Visible = "Visible"; appointmentMappingInfo.ResourceId = "ResourceID"; appointmentMappingInfo.Resources = "FK_CITA1_CITAS"; this.schedulerBindingDataSource1.EventProvider.Mapping = appointmentMappingInfo; schedulerBindingDataSource1.EventProvider.DataSource = schedulerDataDataSet.CITAS; ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo(); resourceMappingInfo.Id = "RoomCode"; resourceMappingInfo.Name = "RoomName"; this.schedulerBindingDataSource1.ResourceProvider.Mapping = appointmentMappingInfo; schedulerBindingDataSource1.ResourceProvider.DataSource = schedulerDataDataSet.SALAS; // assign mapped binding data source this.radScheduler1.DataSource = schedulerBindingDataSource1; schedulerBindingDataSource1.Rebind(); //radScheduler1.DataBind(); } catch (Exception) { throw; } }
private void InitResources() { ResourceMappingInfo mappings = this.schedulerStorage.Resources.Mappings; mappings.Id = "ResID"; mappings.Color = "ResColor"; mappings.Caption = "Name"; mappings.ParentId = "ParentId"; CustomResourceList.Add(new CustomResource(1, "Project Deployment", Color.PowderBlue, 0)); CustomResourceList.Add(new CustomResource(2, "Specifications", Color.PaleVioletRed, 1)); CustomResourceList.Add(new CustomResource(3, "Spike Solution", Color.PeachPuff, 1)); CustomResourceList.Add(new CustomResource(4, "Demos and Docs", Color.AliceBlue, 0)); CustomResourceList.Add(new CustomResource(5, "Demos", Color.FloralWhite, 4)); CustomResourceList.Add(new CustomResource(6, "Docs", Color.Honeydew, 4)); this.schedulerStorage.Resources.DataSource = CustomResourceList; }
private void BindToDataSet() { if (this.schedulerDataSet == null) { this.schedulerDataSet = new SchedulerDataset(); AppointmentsTableAdapter appointmentsAdapter = new AppointmentsTableAdapter(); appointmentsAdapter.Fill(this.schedulerDataSet.Appointments); ResourcesTableAdapter resourcesAdapter = new ResourcesTableAdapter(); resourcesAdapter.Fill(this.schedulerDataSet.Resources); TransientAppointmentsResourcesTableAdapter appointmentsResourcesAdapter = new TransientAppointmentsResourcesTableAdapter(); appointmentsResourcesAdapter.Fill(this.schedulerDataSet.TransientAppointmentsResources); } SchedulerBindingDataSource dataSource = new SchedulerBindingDataSource(); AppointmentMappingInfo appointmentMappingInfo = new AppointmentMappingInfo(); appointmentMappingInfo.Start = "Start"; appointmentMappingInfo.End = "End"; appointmentMappingInfo.Summary = "Summary"; appointmentMappingInfo.Description = "Description"; appointmentMappingInfo.Location = "Location"; appointmentMappingInfo.BackgroundId = "BackgroundID"; appointmentMappingInfo.StatusId = "StatusID"; appointmentMappingInfo.Resources = "Appointments_AppointmentsResources"; appointmentMappingInfo.ResourceId = "ResourceID"; appointmentMappingInfo.RecurrenceRule = "RecurrenceRule"; dataSource.EventProvider.Mapping = appointmentMappingInfo; dataSource.EventProvider.DataSource = this.schedulerDataSet.Appointments; ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo(); resourceMappingInfo.Id = "ID"; resourceMappingInfo.Name = "ResourceName"; dataSource.ResourceProvider.Mapping = resourceMappingInfo; dataSource.ResourceProvider.DataSource = this.schedulerDataSet.Resources; this.radSchedulerDemo.DataSource = dataSource; }
private void RadForm1_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'schedulerDataDataSet.Resources' table. You can move, or remove it, as needed. this.resourcesTableAdapter.Fill(this.schedulerDataDataSet.Resources); // TODO: This line of code loads data into the 'schedulerDataDataSet.AppointmentsResources' table. You can move, or remove it, as needed. this.appointmentsResourcesTableAdapter.Fill(this.schedulerDataDataSet.AppointmentsResources); // TODO: This line of code loads data into the 'schedulerDataDataSet.Appointments' table. You can move, or remove it, as needed. this.appointmentsTableAdapter.Fill(this.schedulerDataDataSet.Appointments); AppointmentMappingInfo appointmentMappingInfo = new AppointmentMappingInfo(); appointmentMappingInfo.BackgroundId = "BackgroundId"; appointmentMappingInfo.Description = "Description"; appointmentMappingInfo.End = "End"; appointmentMappingInfo.Location = "Location"; appointmentMappingInfo.MasterEventId = "MasterEventId"; appointmentMappingInfo.RecurrenceRule = "RecurrenceRule"; appointmentMappingInfo.ResourceId = "ResourceID"; appointmentMappingInfo.Exceptions = "Appointments_Appointments"; appointmentMappingInfo.Resources = "AppointmentsResources_Appointments"; appointmentMappingInfo.Start = "Start"; appointmentMappingInfo.StatusId = "StatusID"; appointmentMappingInfo.Summary = "Summary"; schedulerBindingDataSource1.EventProvider.Mapping = appointmentMappingInfo; ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo(); resourceMappingInfo.Id = "ID"; resourceMappingInfo.Name = "Name"; this.schedulerBindingDataSource1.ResourceProvider.Mapping = resourceMappingInfo; schedulerBindingDataSource1.ResourceProvider.DataSource = schedulerDataDataSet.Resources; schedulerBindingDataSource1.EventProvider.DataSource = schedulerDataDataSet.Appointments; radScheduler1.DataSource = schedulerBindingDataSource1; this.radScheduler1.GroupType = GroupType.Resource; }
void MapResource(ResourceMappingInfo mappings) { mappings.Id = "Id"; mappings.Caption = "Description"; }
private void BindToBusinessObjects() { this.appointments = new List <MyAppointment>(); DateTime baseDate = new DateTime(2009, 3, 7); DateTime[] start = new DateTime[] { baseDate.AddHours(14.0), baseDate.AddDays(1.0).AddHours(9.0), baseDate.AddDays(2.0).AddHours(13.0) }; DateTime[] end = new DateTime[] { baseDate.AddHours(16.0), baseDate.AddDays(1.0).AddHours(15.0), baseDate.AddDays(2.0).AddHours(17.0) }; string[] summaries = new string[] { "Mr. Brown", "Mr. White", "Mrs. Green" }; string[] descriptions = new string[] { "", "", "" }; string[] locations = new string[] { "City", "Out of town", "Service Center" }; MyAppointment appointment = null; for (int i = 0; i < summaries.Length; i++) { appointment = new MyAppointment(start[i], end[i], summaries[i], descriptions[i], locations[i]); this.appointments.Add(appointment); } MyAppointment recurringAppointment = new MyAppointment(baseDate.AddHours(7.0), baseDate.AddHours(10.0), "Recurring appointment with exceptions", null, null); recurringAppointment.RecurrenceRule = "FREQ=DAILY"; MyAppointment notVisibleException = new MyAppointment(recurringAppointment.Start.AddDays(1.0), recurringAppointment.End.AddDays(1.0), "Recurring appointment with exceptions", null, null); notVisibleException.MasterAppointment = recurringAppointment; notVisibleException.Visible = false; recurringAppointment.Exceptions.Add(notVisibleException); this.appointments.Add(recurringAppointment); //int[] resourceIds = new int[] { 1, 2, 3 }; string[] resourceNames = new string[] { "Dell Laptop", "Lenovo Laptop", "Toshiba Laptop" }; this.resources = new List <MyResource>(); for (int i = 0; i < resourceNames.Length; i++) { this.resources.Add(new MyResource(resourceNames[i])); } SchedulerBindingDataSource dataSource = new SchedulerBindingDataSource(); dataSource.EventProvider.AppointmentFactory = this.radSchedulerDemo.AppointmentFactory; AppointmentMappingInfo appointmentMappingInfo = new AppointmentMappingInfo(); appointmentMappingInfo.Mappings.Add(new SchedulerMapping("Email", "Email")); appointmentMappingInfo.Start = "Start"; appointmentMappingInfo.End = "End"; appointmentMappingInfo.Summary = "Subject"; appointmentMappingInfo.Description = "Description"; appointmentMappingInfo.Location = "Location"; appointmentMappingInfo.UniqueId = "Id"; appointmentMappingInfo.Resources = "Resources"; appointmentMappingInfo.ResourceId = "Id"; appointmentMappingInfo.RecurrenceRule = "RecurrenceRule"; appointmentMappingInfo.Exceptions = "Exceptions"; appointmentMappingInfo.MasterEventId = "MasterAppointment"; appointmentMappingInfo.Visible = "Visible"; dataSource.EventProvider.Mapping = appointmentMappingInfo; dataSource.EventProvider.DataSource = this.appointments; ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo(); resourceMappingInfo.Id = "Id"; resourceMappingInfo.Name = "Name"; dataSource.ResourceProvider.Mapping = resourceMappingInfo; dataSource.ResourceProvider.DataSource = this.resources; this.radSchedulerDemo.DataSource = dataSource; }