Dear dude
I want to use RadScheuduler to design clinic scheduler with different doctors. I want to set doctors times in RadScheduler. Then Patient set specified work time in another form. doctor can work in different place. Please see the diagram. Now I have a problem in patient Appointment. I should set time slot disable/enable based on doctorAppointment And Then patient insert appointment for special doctor based on timeslot. I used entityframework but I got may error. How can I Access doctorAppointment in PatientAppointment?
I defiened resourceType for Room,Doctor,DoctorAppointment,AppointmentType but in insertForm I can not Access roomID and DoctorID which are in DoctorAppointmentTable.
RadScheduler:
<telerik:RadScheduler runat="server" ID="PatientsScheduler" GroupBy="Doctor"
DataSourceID="PatientsAppointmentEntityDataSource" DataKeyField="Id" DataSubjectField="FirstName"
DataStartField="Start" DataEndField="End" ....>
InsertTemplate Which has error to find FirstName:
<InlineInsertTemplate>
<asp:Label ID="Label4" AssociatedControlID="FirstNameTextBox" runat="server" CssClass="inline-label"/>
<asp:TextBox ID="FirstNameTextBox" Rows="2" Columns="20" runat="server" Text='<%# Bind("FirstName") %>'
Width="97%" TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="FirstNameRequiredFieldValidator" runat="server" ValidationGroup="Insert"
ControlToValidate="FirstNameTextBox" ErrorMessage="نام بیمار اجباری">*</asp:RequiredFieldValidator>
<br />
<asp:Label ID="Label5" AssociatedControlID="StartInput" runat="server" CssClass="inline-label"/>
<telerik:RadDateInput ID="StartInput" SelectedDate='<%# Bind("Start") %>' runat="server"
EnableSingleInputRendering="false">
</telerik:RadDateInput>
<br />
<asp:Label ID="Label3" AssociatedControlID="AppointmentTypeComboBox" runat="server" />
<telerik:RadComboBox runat="server" ID="AppointmentTypeComboBox" DataTextField="Name"
DataValueField="Id" Width="90%" Skin="Office2007" SelectedValue='<%# Bind("AppointmentTypeId") %>'
DataSourceID="AppointmentTypesEntityDataSource">
</telerik:RadComboBox>
</InlineInsertTemplate>
ResourceTypes are:
<ResourceTypes>
<telerik:ResourceType KeyField="Id" Name="Doctor" TextField="Name" ForeignKeyField="DoctorId"
DataSourceID="DoctorsEntityDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="Id" Name="Room" TextField="Name" ForeignKeyField="RoomId"
DataSourceID="RoomsEntityDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="Id" Name="AppointmentType" TextField="Name" ForeignKeyField="AppointmentTypeId"
DataSourceID="AppointmentTypesEntityDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="Id" Name="DoctorAppointment" TextField="Subject" ForeignKeyField="DoctorAppointmentId"
DataSourceID="DoctorAppointmentsEntityDataSource"></telerik:ResourceType>
</ResourceTypes>
And EntityDataSources Are:
<asp:EntityDataSource ID="DoctorAppointmentsEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities" EntitySetName="DoctorAppointments" EnableInsert="True">
</asp:EntityDataSource>
<asp:EntityDataSource ID="PatientsAppointmentEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities"
EnableInsert="True" EntitySetName="PatientAppointments">
</asp:EntityDataSource>
<asp:EntityDataSource ID="RoomsEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities" EntitySetName="Rooms">
</asp:EntityDataSource>
<asp:EntityDataSource ID="DoctorsEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities" CommandText="SELECT it.[Id] , it.[FirstName] + ' ' + it.[LastName] as Name From DatabaseEntities.Doctors as it">
</asp:EntityDataSource>
<asp:EntityDataSource ID="AppointmentTypesEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities" EntitySetName="AppointmentTypes">
</asp:EntityDataSource>
Please guide me on that. If you think it's better to change my method I would be glad for your kindness
I want to use RadScheuduler to design clinic scheduler with different doctors. I want to set doctors times in RadScheduler. Then Patient set specified work time in another form. doctor can work in different place. Please see the diagram. Now I have a problem in patient Appointment. I should set time slot disable/enable based on doctorAppointment And Then patient insert appointment for special doctor based on timeslot. I used entityframework but I got may error. How can I Access doctorAppointment in PatientAppointment?
I defiened resourceType for Room,Doctor,DoctorAppointment,AppointmentType but in insertForm I can not Access roomID and DoctorID which are in DoctorAppointmentTable.
RadScheduler:
<telerik:RadScheduler runat="server" ID="PatientsScheduler" GroupBy="Doctor"
DataSourceID="PatientsAppointmentEntityDataSource" DataKeyField="Id" DataSubjectField="FirstName"
DataStartField="Start" DataEndField="End" ....>
InsertTemplate Which has error to find FirstName:
<InlineInsertTemplate>
<asp:Label ID="Label4" AssociatedControlID="FirstNameTextBox" runat="server" CssClass="inline-label"/>
<asp:TextBox ID="FirstNameTextBox" Rows="2" Columns="20" runat="server" Text='<%# Bind("FirstName") %>'
Width="97%" TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="FirstNameRequiredFieldValidator" runat="server" ValidationGroup="Insert"
ControlToValidate="FirstNameTextBox" ErrorMessage="نام بیمار اجباری">*</asp:RequiredFieldValidator>
<br />
<asp:Label ID="Label5" AssociatedControlID="StartInput" runat="server" CssClass="inline-label"/>
<telerik:RadDateInput ID="StartInput" SelectedDate='<%# Bind("Start") %>' runat="server"
EnableSingleInputRendering="false">
</telerik:RadDateInput>
<br />
<asp:Label ID="Label3" AssociatedControlID="AppointmentTypeComboBox" runat="server" />
<telerik:RadComboBox runat="server" ID="AppointmentTypeComboBox" DataTextField="Name"
DataValueField="Id" Width="90%" Skin="Office2007" SelectedValue='<%# Bind("AppointmentTypeId") %>'
DataSourceID="AppointmentTypesEntityDataSource">
</telerik:RadComboBox>
</InlineInsertTemplate>
ResourceTypes are:
<ResourceTypes>
<telerik:ResourceType KeyField="Id" Name="Doctor" TextField="Name" ForeignKeyField="DoctorId"
DataSourceID="DoctorsEntityDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="Id" Name="Room" TextField="Name" ForeignKeyField="RoomId"
DataSourceID="RoomsEntityDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="Id" Name="AppointmentType" TextField="Name" ForeignKeyField="AppointmentTypeId"
DataSourceID="AppointmentTypesEntityDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="Id" Name="DoctorAppointment" TextField="Subject" ForeignKeyField="DoctorAppointmentId"
DataSourceID="DoctorAppointmentsEntityDataSource"></telerik:ResourceType>
</ResourceTypes>
And EntityDataSources Are:
<asp:EntityDataSource ID="DoctorAppointmentsEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities" EntitySetName="DoctorAppointments" EnableInsert="True">
</asp:EntityDataSource>
<asp:EntityDataSource ID="PatientsAppointmentEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities"
EnableInsert="True" EntitySetName="PatientAppointments">
</asp:EntityDataSource>
<asp:EntityDataSource ID="RoomsEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities" EntitySetName="Rooms">
</asp:EntityDataSource>
<asp:EntityDataSource ID="DoctorsEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities" CommandText="SELECT it.[Id] , it.[FirstName] + ' ' + it.[LastName] as Name From DatabaseEntities.Doctors as it">
</asp:EntityDataSource>
<asp:EntityDataSource ID="AppointmentTypesEntityDataSource" runat="server" ConnectionString="name=DatabaseEntities"
DefaultContainerName="DatabaseEntities" EntitySetName="AppointmentTypes">
</asp:EntityDataSource>
Please guide me on that. If you think it's better to change my method I would be glad for your kindness