Additional fields for comments etc...

3 posts, 0 answers
  1. Darren
    Darren avatar
    72 posts
    Member since:
    Oct 2006

    Posted 10 Jul 2012 Link to this post

    I am following the example for resource availability but I can't figure out how to store additional text fields (Phone, BookedBy) for the appointments. I don't need them as drop down selectable resources, I need simple text entry. Is there a  way to do this?

    Here is my sql data:
        <asp:SqlDataSource ID="AppointmentsDataSource" runat="server" ProviderName="System.Data.SqlClient"
            ConnectionString="<%$ ConnectionStrings:MCHPEVENTS %>" SelectCommand="SELECT [SchedulingID], [Start], [End], [Subject], [BookedBy], [Phone], [RoomID] FROM [RS_Scheduling]"
            InsertCommand="INSERT INTO [RS_Scheduling] ([Start], [End], [Subject], [RoomID], [BookedBy], [Phone]) VALUES (@Start, @End, @Subject, @RoomID, @BookedBy, @Phone)"
            UpdateCommand="UPDATE [RS_Scheduling] SET [Start] = @Start, [End] = @End, [Subject] = @Subject, [RoomID] = @RoomID, [BookedBy] = @BookedBy, [Phone] = @Phone WHERE (SchedulingID = @SchedulingID)"
            DeleteCommand="DELETE FROM [RS_Scheduling] WHERE [SchedulingID] = @SchedulingID">
            <DeleteParameters>
                <asp:Parameter Name="SchedulingID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="SchedulingID" Type="Int32" />
                <asp:Parameter Name="Start" Type="DateTime" />
                <asp:Parameter Name="End" Type="DateTime" />
                <asp:Parameter Name="Subject" Type="String" />
                <asp:Parameter Name="RoomID" Type="Int32" />
                <asp:Parameter Name="BookedBy" Type="String" />
                <asp:Parameter Name="Phone" Type="String" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Start" Type="DateTime" />
                <asp:Parameter Name="End" Type="DateTime" />
                <asp:Parameter Name="Subject" Type="String" />
                <asp:Parameter Name="RoomID" Type="Int32" />
                <asp:Parameter Name="BookedBy" Type="String" />
                <asp:Parameter Name="Phone" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>

    Thanks

    http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceavailability/defaultvb.aspx 
  2. Darren
    Darren avatar
    72 posts
    Member since:
    Oct 2006

    Posted 10 Jul 2012 Link to this post

    I was able to make progress on this, by using CustomAttributeNames="BookedBy,Phone". I am using <AdvancedForm Modal="true" />, is there a way to specify the height of the edit/insert box that pops up, and is there a way to make BookedBy and Phone required input?

    Thanks in advance!
  3. Darren
    Darren avatar
    72 posts
    Member since:
    Oct 2006

    Posted 11 Jul 2012 Link to this post

    I figured everything out. Thanks.
Back to Top