且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在wpf中显示rad计划控件上的记录。

更新时间:2023-10-19 16:41:46

AppointmentsService.AppointmentsServiceClient client = new AppointmentsService.AppointmentsServiceClient();
          DataTable dtResult = client.GetScheduledDetails();
          //DataTable dtResult = dataStore.GetScheduledDetails();
          ResourceCollection resCollection = this.resourceTypes[0].Resources;

          Telerik.Windows.Controls.ResourceType resourceType = new Telerik.Windows.Controls.ResourceType();
          resourceType.Name = "Tasks";
          resourceType.DisplayName = "Tasks";
          foreach (DataRow row in dtResult.Rows)
          {
              Telerik.Windows.Controls.Resource resource = new        Telerik.Windows.Controls.Resource();
             // resource.DisplayName = row.Field<string>("epmloyee_name");

              Appointment appointment = new Appointment
              {
                  Start = row.Field<DateTime>("jbd_datestarted"),
                 //End = row.Field<DateTime>("EndDate"),
                  Subject = row["jbd_jobheading"].ToString(),
                  //Body = row["Body"].ToString()

              };



              this.appointments.Add(appointment);
              this.resourceTypes.Add(resourceType);
          }