webschedule custom fields, edit and delete event problem

1 reply. Last post: January 10, 2010 10:47 PM by Glenn Layaar
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

i need insert custom fields in web schedule event like customer_id, customer_address, event_status etc to web schedule event. i done, fields can add. but wen i will edit event or delete event not apply on database(show on web, if reload page, not edit or delete).


EditingForm.aspx

<%@ Page Language="VB" AutoEventWireup="true" Inherits="ISNet.WebUI.WebScheduler.WebForm.Editing"
EnableViewState="false" %>

<%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls"
TagPrefix="ISWebInput" %>
<%@ Register Assembly="ISNet.WebUI.WebCombo" Namespace="ISNet.WebUI.WebCombo" TagPrefix="ISWebCombo" %>
<%@ Register Assembly="ISNet.WebUI.WebDesktop" Namespace="ISNet.WebUI.WebDesktop"
TagPrefix="ISWebDesktop" %>
<%@ Register assembly="ISNet.WebUI.ISDataSource, Version=1.0.1500.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b" namespace="ISNet.WebUI.DataSource" tagprefix="ISDataSource" %>
<!--
WebScheduler Editing Form for WebScheduler.NET 1.0.
Powered by Intersoft WebUI Studio.NET 2008 R1.
(c) 2008 Intersoft Solutions Corp. All rights reserved.

The key objectives of this "Open Architecture" Editing Form are:
- Enable you to conveniently customize the styles, appearance, and layout of the Editing Form to suit your needs, as long as the controls and ID are not modified.
- Enable you to easily localize the textual elements used in the Form.
- Enable you to add more fields and custom validations according to your business scenario.
- Enable you to add more controls and possibility to use other third party controls in the Form.
- Enable you to control and customize the behaviors of existing controls, for example, disable an input field.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<script runat="server">



Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If IsPostBack Then
Exit Sub
End If

MyBase.Page_Load(sender, e)

Dim boSec As New DSBytes.EMedic.boSecurity.cSecurity

Dim da As New SqlClient.SqlDataAdapter
Dim dt As New DataTable
Dim i As Integer
Dim row As WebComboRow
Try
'Instentiate the command object for the DataAdaptor

boSec = CType(Session("boSec"), DSBytes.EMedic.boSecurity.cSecurity)

If boSec Is Nothing Then
Exit Try
End If

da.SelectCommand = New System.Data.SqlClient.SqlCommand("sp_GetLocation")

'Setup the command object for the DataAdaptor
With da.SelectCommand
.Connection = New SqlClient.SqlConnection(System.Configuration.ConfigurationManager.AppSettings("DSN"))
.CommandType = Data.CommandType.StoredProcedure
.Parameters.Add("@strVendorID", SqlDbType.VarChar, 15).Value = mIndoUtility.SaveFieldData(boSec.VendorID)

'Setup all the parameters
'.Parameters.Add("@strCityID", SqlDbType.VarChar, 10).Value = SearchCityID
'.Parameters.Add("@strToken", SqlDbType.VarChar, 40).Value = mIndoUtility.SaveFieldData(strToken)

End With

'Populate the datatable with returned result
da.Fill(dt)
'Search = dt

For i = 0 To CInt(dt.Rows.Count) - 1
row = New WebComboRow
row.Cells.Add(New WebComboCell)
row.Cells(0).Text = dt.Rows(i)(0).ToString()
wcLocation.Rows.Add(row)
Next

Catch eGeneralException As Exception
'Error handling
mIndoGlobal.DisplayErrorMessage(eGeneralException, "Login", RaiseErrorTypes.Other)
Finally

'Dispose Objects
da.Dispose()
dt.Dispose()

'Clean up all objects
da = Nothing
dt = Nothing
End Try



'locRow.Cells.Add(New WebComboCell)
'locRow.Cells(0).Text = "Ontario"
'wcLocation.Rows.Add(locRow)
'wcLocation.Rows.Add("Ontario")
'wcLocation.Rows.Add("Kebumen")
End Sub


</script>

<html>
<head id="Head1" runat="server">
<title>Appointment</title>
<script language="javascript" type="text/javascript">
/*function filterLocation()
{
var wcResources = ISGetObject("wcResources");
//var Location = iLocation.GetTextBoxValue();
wcResources.SetAdditionalFilters("[ResourceDescription]='1'" );
wcResources.UpdateState();
} */

function filterLocation()
{
var wcResources = ISGetObject("wcResources");
var wcLocation = ISGetObject("wcLocation");
var location = wcLocation.Value;
//var Location = iLocation.GetTextBoxValue();
wcResources.SetAdditionalFilters("[Location]='" + location + "'" );
}

function removeFilterLocation(){
var wcResources = ISGetObject("wcResources");
wcResources.ClearAdditionalFilters();
}

function calculateTime(){
var wcCategories = ISGetObject("wcCategories");
var wiStartTimeDate = ISGetObject("wiStartTimeDate");
var wiStartTimeTime = ISGetObject("wiStartTimeTime");
var wiEndTimeDate = ISGetObject("wiEndTimeDate");
var wiEndTimeTime =ISGetObject("wiEndTimeTime");
var jobs = wcCategories.GetMultipleValuesValue().split(',');
var rows = wcCategories.GetRows()
var time = 0;
for(var i = 0; i < jobs.length; i++){
jobs[i] = jobs[i].replace(" ", "");
for(var ii = 0; ii< rows.length; ii++){
if(rows[ii].Value == jobs[i]) time = time + parseInt(rows[ii].Cells[1].Value);
}
}
var tDate = new Date(wiStartTimeDate.Text + " " + wiStartTimeTime.Text);
time = time + tDate.getMinutes();
tDate.setMinutes(time);
//alert("Total Time );
if(tDate.getHours()<10) wiEndTimeTime.SetValueData('0' + tDate.getHours() + ":" + tDate.getMinutes());
else wiEndTimeTime.SetValueData(tDate.getHours() + ":" + tDate.getMinutes());
}

function setAdditionalFilter()
{
alert( wc_getValue("wcResources"));
wc_setAdditionalFilters("wcResources", "ResourceName LIKE 'A%'");
}


</script>
</head>
<body id="EditingForm" scroll="no" topmargin="5" style="overflow: hidden">
<form id="form1" runat="server">
<table id="mainTable" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
<tr style="height: 100%">
<td style="height: 100%" valign="top">
<div id="mainContainer" style="height: 100%; width: 100%; overflow: auto" onscroll="WS_OnScroll()">
<table cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td>
<span class="header" onclick="WS_HideShowContent('generalImg', 'generalContent')">
<img id="generalImg" src="ISRes.axd?S/arrow_down.gif" align="absmiddle" />
General</span>
</td>
</tr>
<tr>
<td class="indent" id="generalContent">
<table cellpadding="2" cellspacing="2" style="width: 100%; table-layout: fixed">
<colgroup>
<col width="110" />
<col width="200" />
<col width="100" />
<col width="100%" />
</colgroup>
<tr>
<td>
<ISDataSource:ISDataSource ID="ISDataSource1" runat="server"
SchemaName="dsEmedicSchedule1" EnableCaching="Yes" StoreCachePerPage="Yes"
CacheStorage="Default">
<tables>
<ISDataSource:ISDataSourceTable SelectMethod="GetData"
TableName="sp_GetEmployeeVendor"
TypeName="dsEmedicSchedule1TableAdapters.sp_GetEmployeeVendorTableAdapter">
<SelectParameters>
<asp:SessionParameter DefaultValue="0" Name="strVendorID"
SessionField="VendorID" Type="String" />
</SelectParameters>
</ISDataSource:ISDataSourceTable>
<ISDataSource:ISDataSourceTable SelectMethod="GetData" TableName="sp_GetLocation"
TypeName="dsEmedicSchedule1TableAdapters.sp_GetLocationTableAdapter">
</ISDataSource:ISDataSourceTable>
</tables>
</ISDataSource:ISDataSource>
Employee:
</td>
<td valign="top">

<ISWebCombo:WebCombo ID="wcResources" runat="server" UseDefaultStyle="True" Width="120px"
Height="20px" DataTextField="ResourceName" DataValueField="ResourceID">
<Columns>
<ISWebCombo:WebComboColumn BaseFieldName="ResourceName" HeaderText="Name" Bound="False"
Name="ResourceName" Width="150px" />
<ISWebCombo:WebComboColumn BaseFieldName="ResourceDescription" HeaderText="Location"
Bound="False" Name="ResourceDescription" Width="200px" />
<ISWebCombo:WebComboColumn BaseFieldName="Action" HeaderText=" " Bound="False" Name="Action"
Width="1px" />
<ISWebCombo:WebComboColumn BaseFieldName="ResourceID" Bound="False" Name="ResourceID"
Hidden="True" />
</Columns>
<LayoutSettings StatusBoxVisible="False" ComboMode="MultipleColumns" ResultBoxHeight="80"
ResultBoxWindowType="Normal" EnableSlidingAnimation="true"
ResultBoxShadow="true" BoundMode="AutoDetect">
</LayoutSettings>
</ISWebCombo:WebCombo>

</td>
<td valign="top" align="right">
<!--
<input id="Button1" type="button" value="button" onclick="setAdditionalFilter()" />

Location
-->
</td>
<td valign="top">

 </td>
<td>
 </td>
</tr>
<tr style="">
<td colspan="4">
<hr />
</td>
<td>
 </td>
</tr>
<tr>
<td>
Patient:
<td colspan="3">
<ISWebInput:WebInput ID="wiSubject" runat="server" Width="350px" AcceptEnter="False">
<CultureInfo CultureName="en-US">
</CultureInfo>
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
<td>
 </td>
</tr>
<tr style=" display:none">
<td>
 </td>
<td colspan="3">
<ISWebInput:WebInput ID="wiLocation" runat="server" AcceptEnter="False" Width="350px">
<CultureInfo CultureName="en-US">
</CultureInfo>
<EditFormat>
<ErrorWindowInfo IsEnabled="False"></ErrorWindowInfo>
</EditFormat>

<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>

<DisplayFormat>
<ErrorWindowInfo IsEnabled="False"></ErrorWindowInfo>
</DisplayFormat>
</ISWebInput:WebInput>
</td>
<td>
 </td>
</tr>
<tr>
<td>
Address:
</td>
<td colspan="3">
<div style="display:none">
<ISWebInput:WebInput ID="wiPatientID" runat="server" Width="1px">
<EditFormat>
<ErrorWindowInfo IsEnabled="False"></ErrorWindowInfo>
</EditFormat>
<CultureInfo CultureName="en-US"></CultureInfo>
<DisplayFormat>
<ErrorWindowInfo IsEnabled="False"></ErrorWindowInfo>
</DisplayFormat>
</ISWebInput:WebInput>
</div>
<ISWebInput:WebInput ID="wiAddress" runat="server" Width="350px">
<DisplayFormat>
<ErrorWindowInfo IsEnabled="False"></ErrorWindowInfo>
</DisplayFormat>

<EditFormat>
<ErrorWindowInfo IsEnabled="False"></ErrorWindowInfo>
</EditFormat>
</ISWebInput:WebInput>
</td>
<td>
 </td>
</tr>
<tr>
<td colspan="4">
<table cellpadding="0" cellspacing="0" style="height: 100%;">
<tr>
<td style="width: 110px;">
Start time:
</td>
<td style="padding: 2px">
<ISWebInput:WebInput ID="wiStartTimeDate" runat="server" Width="120px" AcceptEnter="False">
<CultureInfo CultureName="en-US">
</CultureInfo>
<DisplayFormat Format="ddd MM/dd/yyyy" IsEnabled="True">
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</DisplayFormat>
<EditFormat Format="MM/dd/yyyy" IsEnabled="True">
<MaskInfo MaskExpression="00/00/0000">
</MaskInfo>
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</EditFormat>
<DateTimeEditor IsEnabled="True">
</DateTimeEditor>
<HighLight IsEnabled="True" Type="Phrase" />
<ClientSideEvents OnAfterValueChanged="WS_StartTimeDate_OnAfterValueChanged">
</ClientSideEvents>
<TextBoxStyle>
<Active CssClass="datetextbox">
</Active>
<Over CssClass="datetextbox">
</Over>
<Normal CssClass="datetextbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
<td style="padding: 2px">
<ISWebInput:WebInput ID="wiStartTimeTime" runat="server" Width="60px" AcceptEnter="False">
<HighLight IsEnabled="True" Type="Phrase" />
<CultureInfo CultureName="en-US">
</CultureInfo>
<EditFormat Format="HH:mm" IsEnabled="True">
<MaskInfo MaskExpression="00:00">
</MaskInfo>
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</EditFormat>
<ClientSideEvents OnAfterValueChanged="WS_StartTimeTime_OnAfterValueChanged">
<DropDownButtonEditorEvents OnClick="WS_StartTimeTime_OnClick" />
</ClientSideEvents>
<TextBoxStyle>
<Active CssClass="datetextbox">
</Active>
<Over CssClass="datetextbox">
</Over>
<Normal CssClass="datetextbox">
</Normal>
</TextBoxStyle>
<DateTimeEditor IsEnabled="True">
</DateTimeEditor>
</ISWebInput:WebInput>
</td>
<td style="padding-left: 10px; display:none">
<input id="cbAllDayEvent" type="checkbox" onclick="WS_CbAllDayEventClick()" />
</td>
</tr>
<tr>
<td style="width: 110px;">
End time:
</td>
<td style="padding: 2px">
<ISWebInput:WebInput ID="wiEndTimeDate" runat="server" Width="120px" AcceptEnter="False">
<CultureInfo CultureName="en-US">
</CultureInfo>
<HighLight IsEnabled="True" Type="Phrase" />
<ClientSideEvents OnAfterValueChanged="WS_EndTimeDate_OnAfterValueChanged" OnBeforeValueChanged="WS_EndTimeDate_OnBeforeValueChanged">
</ClientSideEvents>
<DisplayFormat Format="ddd MM/dd/yyyy" IsEnabled="True">
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</DisplayFormat>
<EditFormat Format="MM/dd/yyyy" IsEnabled="True">
<MaskInfo MaskExpression="00/00/0000">
</MaskInfo>
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</EditFormat>
<DateTimeEditor IsEnabled="True">
</DateTimeEditor>
<TextBoxStyle>
<Active CssClass="datetextbox">
</Active>
<Over CssClass="datetextbox">
</Over>
<Normal CssClass="datetextbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
<td style="padding: 2px">
<ISWebInput:WebInput ID="wiEndTimeTime" runat="server" Width="60px" AcceptEnter="False">
<HighLight IsEnabled="True" Type="Phrase" />
<CultureInfo CultureName="en-US">
</CultureInfo>
<EditFormat Format="HH:mm" IsEnabled="True">
<MaskInfo MaskExpression="00:00">
</MaskInfo>
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</EditFormat>
<ClientSideEvents OnAfterValueChanged="WS_EndTimeTime_OnAfterValueChanged">
<DropDownButtonEditorEvents OnClick="WS_EndTimeTime_OnClick" />
</ClientSideEvents>
<TextBoxStyle>
<Active CssClass="datetextbox">
</Active>
<Over CssClass="datetextbox">
</Over>
<Normal CssClass="datetextbox">
</Normal>
</TextBoxStyle>
<DateTimeEditor IsEnabled="True">
</DateTimeEditor>
</ISWebInput:WebInput>
</td>
<td style="padding-left: 10px">
<table cellpadding="0" cellspacing="0">
<tr>
<td>
Reminder: </td>
<td>
<ISWebCombo:WebCombo ID="wcReminder" runat="server" UseDefaultStyle="True" Width="85px"
Height="20px" DataTextField="Reminder" DataValueField="ReminderValue">
<Columns>
<ISWebCombo:WebComboColumn Bound="False" BaseFieldName="Reminder" HeaderText="Reminder"
Name="Reminder" Width="120px" />
<ISWebCombo:WebComboColumn Bound="False" BaseFieldName="ReminderValue" HeaderText="Value"
Name="ReminderValue" Width="100px" Hidden="true" />
</Columns>
<LayoutSettings StatusBoxVisible="False" ResultBoxWindowType="Normal" EnableSlidingAnimation="True" AllowFloatingText="True">
</LayoutSettings>
</ISWebCombo:WebCombo>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width: 110px;">
Location</td>
<td style="padding: 2px">
<ISWebCombo:WebCombo ID="wcLocation" runat="server" UseDefaultStyle="True"
Height="20px" Width="120px" >
<Columns>
<ISWebCombo:WebComboColumn Bound="False" Name="locationName" />
</Columns>

</ISWebCombo:WebCombo>
</td>
<td style="padding: 2px">
 </td>
<td style="padding-left: 10px">
 </td>
</tr>
<tr>
<td style="width: 110px;">
Status</td>
<td style="padding: 2px">
<ISWebCombo:WebCombo ID="cbStatus" runat="server" Height="20px"
UseDefaultStyle="True" Width="120px" DropDownRows="3" >
<Columns>
<ISWebCombo:WebComboColumn Bound="False" Name="Column0" />
</Columns>
<LayoutSettings AllowAddItem="True">
</LayoutSettings>
<Rows>
<ISWebCombo:WebComboRow>
<Cells>
<ISWebCombo:WebComboCell Text="Scheduled">
</ISWebCombo:WebComboCell>
</Cells>
</ISWebCombo:WebComboRow>
<ISWebCombo:WebComboRow Position="1">
<Cells>
<ISWebCombo:WebComboCell Text="Confirmed">
</ISWebCombo:WebComboCell>
</Cells>
</ISWebCombo:WebComboRow>
<ISWebCombo:WebComboRow Position="2">
<Cells>
<ISWebCombo:WebComboCell Text="Cancelled">
</ISWebCombo:WebComboCell>
</Cells>
</ISWebCombo:WebComboRow>
<ISWebCombo:WebComboRow Position="3">
<Cells>
<ISWebCombo:WebComboCell Text="No-Show">
</ISWebCombo:WebComboCell>
</Cells>
</ISWebCombo:WebComboRow>
</Rows>
<LayoutSettings StatusBoxVisible="False" ComboMode="MultipleColumns" ResultBoxHeight="80"
ResultBoxWindowType="Normal" EnableSlidingAnimation="true" ResultBoxShadow="true">
</LayoutSettings>
</ISWebCombo:WebCombo>
</td>
<td style="padding: 2px">
 </td>
<td style="padding-left: 10px">
 </td>
</tr>
</table>
</td>
<td>
 </td>
</tr>
<tr>
<td colspan="4">
<hr />
</td>
<td>
 </td>
</tr>
<tr>
<td>
Importance:
</td>
<td colspan="3">
<ISWebCombo:WebCombo ID="wcImportant" runat="server" UseDefaultStyle="True" Width="120px"
Height="20px" DropDownRows="3">
<Columns>
<ISWebCombo:WebComboColumn Bound="False" ColumnType="ImageAndText" Name="Column0"
Width="120px" />
</Columns>
<LayoutSettings StatusBoxVisible="False" ComboMode="MultipleColumns" ResultBoxHeight="80"
ResultBoxWindowType="Normal" EnableSlidingAnimation="true" ResultBoxShadow="true">
</LayoutSettings>
</ISWebCombo:WebCombo>
</td>
<td>
 </td>
</tr>
<tr>
<td>
Service:
</td>
<td colspan="3">
<ISWebCombo:WebCombo ID="wcCategories" runat="server" UseDefaultStyle="True" DataTextField="CategoryName"
DataValueField="CategoryID" Height="20px" Width="200px">
<Columns>
<ISWebCombo:WebComboColumn BaseFieldName="CategoryName" HeaderText="Name" Bound="False"
Name="CategoryName" Width="150px" />
<ISWebCombo:WebComboColumn BaseFieldName="CategoryDescription" HeaderText="Description"
Bound="False" Name="CategoryDescription" Width="200px" />
<ISWebCombo:WebComboColumn BaseFieldName="Action" HeaderText=" " Bound="False" Name="Action"
Width="1px" />
<ISWebCombo:WebComboColumn BaseFieldName="CategoryID" Bound="False" Name="CategoryID"
Hidden="True" />
</Columns>
<LayoutSettings StatusBoxVisible="False" ComboMode="MultipleColumns" ResultBoxHeight="100"
ResultBoxWindowType="Normal" EnableSlidingAnimation="true" ResultBoxShadow="true"
TextBoxMode="ReadOnly">
<ClientSideEvents OnAfterItemSelected="WS_CategoryChanged"
OnLostFocus="calculateTime()" />
</LayoutSettings>
<MultipleSelectionSettings Enabled="True" SeparatorChar="," />
</ISWebCombo:WebCombo>
 </td>
<td>
 </td>
</tr>
</table>
</td>
</tr>
<tr style="display:none">
<td>
<span class="header" onclick="WS_HideShowContent('recurrenceImg', 'recurrenceContent')">
<img id="recurrenceImg" src="ISRes.axd?S/arrow_right.gif" align="absmiddle" />
Recurrence </span>
</td>
</tr>
<tr id="recurrenceContent" style="display: none;">
<td class="indent">
<table cellpadding="0" cellspacing="0" style="padding-left: 5px; width: 100%; height: 100%;">
<tr style="height: 40px;">
<td>
<table cellpadding="0" cellspacing="0" style="width: 100%;">
<tr>
<td class="subheader">
Recurrence pattern
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table id="recurrenceTable" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
<tr>
<td style="width: 110px;">
<input id="rbNoRecurrence" name="rbRecurrence" type="radio" onclick="WS_RecurrenceRadioButtonClick()"
checked="CHECKED" /><label for="rbNoRecurrence">
No recurrence</label>
</td>
<td rowspan="5" class="vline">
 
</td>
<td rowspan="5">
<table id="DailyTable" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;
display: none;">
<tr>
<td style="width: 10px;">
<input id="rbDailyDay" type="radio" name="Daily" />
</td>
<td>
<label for="rbDailyDay">
Every</label>
</td>
<td>
<ISWebInput:WebInput ID="wiDaily" runat="server" MaxLength="3" Width="30px" AcceptEnter="False">
<CultureInfo CultureName="en-US">
</CultureInfo>
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
<td style="width: 80%;">
days(s)
</td>
</tr>
<tr>
<td colspan="4">
<input id="rbDailyWeek" type="radio" name="Daily" /><label for="rbDailyWeek">Every weekday(s)</label>
</td>
</tr>
<tr style="height: 80%;">
<td colspan="4">
</td>
</tr>
</table>
<table id="WeeklyTable" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;
display: none;">
<tr>
<td style="width: 100px;">
Recur every
</td>
<td style="width: 40px;">
<ISWebInput:WebInput ID="wiRecurEvery" runat="server" MaxLength="2" Width="30px"
AcceptEnter="false">
<CultureInfo CultureName="en-US">
</CultureInfo>
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
<td style="width: 75%;">
week(s) on:
</td>
</tr>
<tr>
<td colspan="3">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="width: 90px;">
<input id="cbSunday" type="checkbox" />
<label for="cbSunday">
Sunday</label>
</td>
<td style="width: 90px;">
<input id="cbMonday" type="checkbox" />
<label for="cbMonday">
Monday</label>
</td>
<td style="width: 90px;">
<input id="cbTuesday" type="checkbox" />
<label for="cbTuesday">
Tuesday</label>
</td>
<td>
<input id="cbWednesday" type="checkbox" />
<label for="cbWednesday">
Wednesday</label>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="width: 90px;">
<input id="cbThursday" type="checkbox" />
<label for="cbThursday">
Thursday</label>
</td>
<td style="width: 90px;">
<input id="cbFriday" type="checkbox" />
<label for="cbFriday">
Friday</label>
</td>
<td>
<input id="cbSaturday" type="checkbox" />
<label for="cbSaturday">
Saturday</label>
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table id="MonthlyTable" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;
display: none;">
<tr>
<td style="width: 35px;">
Day
</td>
<td>
<ISWebInput:WebInput ID="wiMonthlyDay" runat="server" MaxLength="2" Width="30px"
AcceptEnter="false">
<CultureInfo CultureName="en-US">
</CultureInfo>
<TextBoxStyle>
<Active Font-Names="Segoe UI" Font-Size="8pt">
<Padding Left="4px" Right="4px" Top="2px" />
</Active>
<Over Font-Names="Segoe UI" Font-Size="8pt">
<Padding Left="4px" Right="4px" Top="2px" />
</Over>
<Normal Font-Names="Segoe UI" Font-Size="8pt">
<Padding Left="4px" Right="4px" Top="2px" />
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
<td>
of every
</td>
<td>
<ISWebInput:WebInput ID="wiMonthlyMonth" runat="server" MaxLength="2" Width="30px"
AcceptEnter="false">
<CultureInfo CultureName="en-US">
</CultureInfo>
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
<td style="width: 65%;">
month(s)
</td>
</tr>
<tr style="height: 80%;">
<td colspan="6">
</td>
</tr>
</table>
<table id="YearlyTable" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;
display: none;">
<tr style="height: 30px;">
<td style="width: 35px;" valign="middle">
Every
</td>
<td style="width: 130px" valign="middle">
<ISWebCombo:WebCombo ID="wcYearlyMonth" runat="server" UseDefaultStyle="true" Width="120px"
DataTextField="MonthName" DataValueField="MonthNumber">
<Columns>
<ISWebCombo:WebComboColumn BaseFieldName="MonthName" HeaderText="Name" Bound="False"
Name="MonthName" Width="150px" />
<ISWebCombo:WebComboColumn BaseFieldName="MonthNumber" Bound="False" Name="MonthNumber"
Hidden="True" />
</Columns>
<LayoutSettings StatusBoxVisible="False" ResultBoxWindowType="Normal" EnableSlidingAnimation="true"
ResultBoxShadow="true">
</LayoutSettings>
</ISWebCombo:WebCombo>
</td>
<td valign="middle" style="padding-top: 3px">
<ISWebInput:WebInput ID="wiYearlyDate" NumericInput="true" runat="server" MaxLength="2"
Width="30px" Height="18px" AcceptEnter="false">
<CultureInfo CultureName="en-US">
</CultureInfo>
<TextBoxStyle>
<Active CssClass="textbox2">
</Active>
<Over CssClass="textbox2">
</Over>
<Normal CssClass="textbox2">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
</tr>
<tr style="height: 75%;">
<td colspan="4">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<input id="rbDaily" name="rbRecurrence" type="radio" onclick="WS_RecurrenceRadioButtonClick()" />
<label for="rbDaily">
Daily</label>
</td>
</tr>
<tr>
<td style="width: 110px;">
<input id="rbWeekly" name="rbRecurrence" type="radio" onclick="WS_RecurrenceRadioButtonClick()" />
<label for="rbWeekly">
Weekly</label>
</td>
</tr>
<tr>
<td style="width: 110px;">
<input id="rbMonthly" name="rbRecurrence" type="radio" onclick="WS_RecurrenceRadioButtonClick()" />
<label for="rbMonthly">
Monthly</label>
</td>
</tr>
<tr>
<td style="width: 110px;">
<input id="rbYearly" name="rbRecurrence" type="radio" onclick="WS_RecurrenceRadioButtonClick()" />
<label for="rbYearly">
Yearly</label>
</td>
</tr>
</table>
</td>
</tr>
<tr style="height: 40px;">
<td>
<table cellpadding="0" cellspacing="0" style="width: 100%;">
<tr>
<td class="subheader">
Range of recurrence
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="indent">
<table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
<tr>
<td rowspan="3" style="width: 40px;">
Start:
</td>
<td rowspan="3" style="width: 180px;">
<ISWebInput:WebInput ID="wiStartRangeOfRecurrence" runat="server" Width="150px" AcceptEnter="False">
<HighLight IsEnabled="True" Type="Phrase" />
<DisplayFormat Format="ddd MM/dd/yyyy" IsEnabled="True">
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</DisplayFormat>
<EditFormat Format="MM/dd/yyyy" IsEnabled="True">
<MaskInfo MaskExpression="00/00/0000">
</MaskInfo>
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</EditFormat>
<CultureInfo CultureName="en-US">
</CultureInfo>
<DateTimeEditor IsEnabled="True">
</DateTimeEditor>
<TextBoxStyle>
<Active CssClass="datetextbox">
</Active>
<Over CssClass="datetextbox">
</Over>
<Normal CssClass="datetextbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
<td>
<input id="rbNoEndDate" name="RangeOfRecurrence" type="radio" />
<label for="rbNoEndDate">
No end date</label>
</td>
</tr>
<tr>
<td style="width: 100px;">
<input id="rbEndDate" name="RangeOfRecurrence" type="radio" />
<label for="rbEndDate">
End after:</label>
</td>
<td style="width: 7%;">
<ISWebInput:WebInput ID="wiRangeOccurrance" runat="server" MaxLength="3" Width="30px"
AcceptEnter="False">
<CultureInfo CultureName="en-US">
</CultureInfo>
<TextBoxStyle>
<Active CssClass="datetextbox">
</Active>
<Over CssClass="datetextbox">
</Over>
<Normal CssClass="datetextbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
<td>
occurences
</td>
</tr>
<tr>
<td style="width: 100px;">
<input id="rbEndBy" type="radio" name="RangeOfRecurrence" />
<label for="rbEndBy">
End by:</label>
</td>
<td colspan="2">
<ISWebInput:WebInput ID="wiRecurrenceEndBy" runat="server" Width="150px" AcceptEnter="False">
<HighLight IsEnabled="True" Type="Phrase" />
<DisplayFormat Format="ddd MM/dd/yyyy" IsEnabled="True">
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</DisplayFormat>
<EditFormat Format="MM/dd/yyyy" IsEnabled="True">
<MaskInfo MaskExpression="00/00/0000">
</MaskInfo>
<ErrorWindowInfo IsEnabled="True">
</ErrorWindowInfo>
</EditFormat>
<CultureInfo CultureName="en-US">
</CultureInfo>
<DateTimeEditor IsEnabled="True">
</DateTimeEditor>
<TextBoxStyle>
<Active CssClass="datetextbox">
</Active>
<Over CssClass="datetextbox">
</Over>
<Normal CssClass="datetextbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<span class="header" onclick="WS_HideShowContent('descriptionImg', 'descriptionContent')">
<img id="descriptionImg" src="ISRes.axd?S/arrow_down.gif" align="absmiddle" />
Description <img title="Maximize description" id="maximizeDescription" src="ISRes.axd?S/maximize.png" onclick="WS_MaximizeDescription('descriptionContent', 'maximizeDescription', 'restoreDescription')" />
<img title="Restore description" id="restoreDescription" src="ISRes.axd?S/restore.png" style="display:none;" onclick="WS_RestoreDescription('descriptionContent', 'maximizeDescription', 'restoreDescription')" />
</span>
</td>
</tr>
<tr id="descriptionContent">
<td class="indent">
<div id="divDescription" style="padding: 5px; width:100%; height:100%;">
<ISWebInput:WebInput ID="wiDescription" runat="server" Width="90%" Rows="15" TextMode="MultiLine"
Height="80px">
<CultureInfo CultureName="en-US">
</CultureInfo>
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
</ISWebInput:WebInput>
</div>
</td>
</tr>
</table>
<ISWebDesktop:WebCallOut ID="callOutManageResources" runat="server" ContentMode="UseTemplate"
DisplayTitleIcon="False" Height="55px" Width="320px" CloseBehavior="MouseOut"
OffsetTopPointingPosition="13" OffsetBottomPointingPosition="-13">
<ImagesSettings BottomCenter="WhiteMac/BottomCenter.png" BottomLeft="WhiteMac/BottomLeft.png"
BottomRight="WhiteMac/BottomRight.png" Close="WhiteMac/CloseIcon.gif" CloseHover="WhiteMac/CloseIcon2.gif"
MiddleLeft="WhiteMac/MiddleLeft.png" MiddleRight="WhiteMac/MiddleRight.png" PointingBottomLeft="WhiteMac/PointingBottomLeft.png"
PointingBottomRight="WhiteMac/PointingBottomRight.png" PointingTopLeft="WhiteMac/PointingTopLeft.png"
PointingTopRight="WhiteMac/PointingTopRight.png" Title="WhiteMac/TitleIcon.png"
TopCenter="WhiteMac/TopCenter.png" TopLeft="WhiteMac/TopLeft.png" TopRight="WhiteMac/TopRight.png" />
<ContainerStyle BackColor="White">
</ContainerStyle>
<ContentTemplate>
<table cellpadding="0" cellspacing="0" style="margin-top: 5px">
<tr style="height: 30px;">
<td style="width: 80px">
Name:
</td>
<td style="width: 10px;">
</td>
<td>
<ISWebInput:WebInput ID="wiResourceName" runat="server" AcceptEnter="false">
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
<CultureInfo CultureName="en-US">
</CultureInfo>
</ISWebInput:WebInput>
</td>
</tr>
<tr style="height: 30px;">
<td>
Color:
</td>
<td style="width: 10px;">
</td>
<td>
<ISWebCombo:WebCombo ID="wcResourcesColor" runat="server" UseDefaultStyle="true"
Width="120px" DataTextField="ColorName" DataValueField="HexaColor">
<Columns>
<ISWebCombo:WebComboColumn ColumnType="ImageAndText" BaseFieldName="ColorName" HeaderText="Color"
Bound="False" Name="ColorName" Width="100px" />
<ISWebCombo:WebComboColumn BaseFieldName="HexaColor" Bound="False" Name="HexaColor"
Hidden="True" />
</Columns>
<LayoutSettings EnableSlidingAnimation="true" ResultBoxShadow="true" ResultBoxWindowType="Normal"
StatusBoxVisible="False">
</LayoutSettings>
</ISWebCombo:WebCombo>
</td>
</tr>
<tr style="height: 30px;">
<td>
Location:
</td>
<td style="width: 10px;">
</td>
<td>
<ISWebInput:WebInput ID="wiRLocation" runat="server" AcceptEnter="false">
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
<CultureInfo CultureName="en-US">
</CultureInfo>
</ISWebInput:WebInput>
</td>
</tr>
<tr>
<td valign="top" style="padding-top: 4px">
Description:
</td>
<td style="width: 10px;">
</td>
<td>
<ISWebInput:WebInput ID="wiRDescription" runat="server" Height="50px" Rows="3" TextMode="MultiLine"
AcceptEnter="false">
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
<CultureInfo CultureName="en-US">
</CultureInfo>
</ISWebInput:WebInput>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td style="padding-top: 5px;">
<ISWebDesktop:WebButton ID="wbRUpdate" runat="server" Height="20px" OnClientClick="WS_OnUpdateResource()"
Text="Update & Close" Width="150px">
<ButtonStyle>
<Normal CssClass="Button-N">
</Normal>
<Over CssClass="Button-O">
</Over>
<Active CssClass="Button-A">
</Active>
</ButtonStyle>
<DisabledStyle CssClass="Button-Disabled">
</DisabledStyle>
</ISWebDesktop:WebButton>
<ISWebDesktop:WebButton ID="wbRSave" runat="server" Height="20px" OnClientClick="WS_OnSaveResource()"
Text="Add & Close" Width="150px">
<ButtonStyle>
<Normal CssClass="Button-N">
</Normal>
<Over CssClass="Button-O">
</Over>
<Active CssClass="Button-A">
</Active>
</ButtonStyle>
<DisabledStyle CssClass="Button-Disabled">
</DisabledStyle>
</ISWebDesktop:WebButton>
</td>
</tr>
</table>
</ContentTemplate>
<ClientSideEvents OnShow="WS_CallOutManageResourcesOnShow" />
</ISWebDesktop:WebCallOut>
<ISWebDesktop:WebCallOut ID="callOutManageCategories" runat="server" ContentMode="UseTemplate"
DisplayTitleIcon="False" DisplayTitleText="True" Height="55px" Width="320px"
CloseBehavior="MouseOut" OffsetTopPointingPosition="13" OffsetBottomPointingPosition="-13">
<ImagesSettings BottomCenter="WhiteMac/BottomCenter.png" BottomLeft="WhiteMac/BottomLeft.png"
BottomRight="WhiteMac/BottomRight.png" Close="WhiteMac/CloseIcon.gif" CloseHover="WhiteMac/CloseIcon2.gif"
MiddleLeft="WhiteMac/MiddleLeft.png" MiddleRight="WhiteMac/MiddleRight.png" PointingBottomLeft="WhiteMac/PointingBottomLeft.png"
PointingBottomRight="WhiteMac/PointingBottomRight.png" PointingTopLeft="WhiteMac/PointingTopLeft.png"
PointingTopRight="WhiteMac/PointingTopRight.png" Title="WhiteMac/TitleIcon.png"
TopCenter="WhiteMac/TopCenter.png" TopLeft="WhiteMac/TopLeft.png" TopRight="WhiteMac/TopRight.png" />
<ContainerStyle BackColor="White">
</ContainerStyle>
<ContentTemplate>
<table cellpadding="0" cellspacing="0" style="margin-top: 5px">
<tr style="height: 30px;">
<td>
Name:
</td>
<td style="width: 10px;">
</td>
<td>
<ISWebInput:WebInput ID="wiCategoryName" runat="server" AcceptEnter="false">
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
<CultureInfo CultureName="en-US">
</CultureInfo>
</ISWebInput:WebInput>
</td>
</tr>
<tr style="height: 30px;">
<td>
Color:
</td>
<td style="width: 10px;">
</td>
<td>
<ISWebCombo:WebCombo ID="wcCategoryColor" runat="server" UseDefaultStyle="true" Width="120px">
<Columns>
<ISWebCombo:WebComboColumn ColumnType="ImageAndText" BaseFieldName="ColorName" HeaderText="Color"
Bound="False" Name="ColorName" Width="100px" />
<ISWebCombo:WebComboColumn BaseFieldName="HexaColor" Bound="False" Name="HexaColor"
Hidden="True" />
</Columns>
<LayoutSettings EnableSlidingAnimation="true" ResultBoxShadow="true" ResultBoxWindowType="Normal"
StatusBoxVisible="False">
</LayoutSettings>
</ISWebCombo:WebCombo>
</td>
</tr>
<tr style="height: 30px;">
<td>
Description:
</td>
<td style="width: 10px;">
</td>
<td>
<ISWebInput:WebInput ID="wiCDescription" runat="server" AcceptEnter="false">
<TextBoxStyle>
<Active CssClass="textbox">
</Active>
<Over CssClass="textbox">
</Over>
<Normal CssClass="textbox">
</Normal>
</TextBoxStyle>
<CultureInfo CultureName="en-US">
</CultureInfo>
</ISWebInput:WebInput>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td style="padding-top: 2px">
<ISWebDesktop:WebButton ID="wbCUpdate" runat="server" Height="20px" OnClientClick="WS_OnUpdateCategory()"
Text="Update & Close" Width="150px">
<ButtonStyle>
<Normal CssClass="Button-N">
</Normal>
<Over CssClass="Button-O">
</Over>
<Active CssClass="Button-A">
</Active>
</ButtonStyle>
<DisabledStyle CssClass="Button-Disabled">
</DisabledStyle>
</ISWebDesktop:WebButton>
<ISWebDesktop:WebButton ID="wbCSave" runat="server" Height="20px" OnClientClick="WS_OnSaveCategory()"
Text="Add & Close" Width="150px">
<ButtonStyle>
<Normal CssClass="Button-N">
</Normal>
<Over CssClass="Button-O">
</Over>
<Active CssClass="Button-A">
</Active>
</ButtonStyle>
<DisabledStyle CssClass="Button-Disabled">
</DisabledStyle>
</ISWebDesktop:WebButton>
</td>
</tr>
</table>
</ContentTemplate>
<ClientSideEvents OnShow="WS_CallOutManageCategoriesOnShow" />
</ISWebDesktop:WebCallOut>
<br />
</div>
</td>
</tr>
<tr>
<td>
<hr />
</td>
</tr>
<tr>
<td>
<div id="fixedContainer">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td nowrap>
<div id="eventStatus" style="padding: 2px; color: DarkRed; font-weight: bold; display: none">
<img src="ISRes.axd?S/TitleIcon.gif " align="absmiddle" />
This event occurs in the past.
</div>
</td>
<td width="280" nowrap align="right" style="padding-right: 5px">
<ISWebDesktop:WebButton ID="wbSave" runat="server" Height="20px" Width="150px" Text="Save & Close"
OnClientClick="WS_OnSave()">
<ButtonStyle>
<Normal CssClass="Button-N">
</Normal>
<Over CssClass="Button-O">
</Over>
<Active CssClass="Button-A">
</Active>
</ButtonStyle>
<DisabledStyle CssClass="Button-Disabled">
</DisabledStyle>
</ISWebDesktop:WebButton>
 
<ISWebDesktop:WebButton ID="wbCancel" runat="server" Height="20px" Width="100px"
Text="Cancel" OnClientClick="WS_OnCancel()">
<ButtonStyle>
<Normal CssClass="Button-N">
</Normal>
<Over CssClass="Button-O">
</Over>
<Active CssClass="Button-A">
</Active>
</ButtonStyle>
<DisabledStyle CssClass="Button-Disabled">
</DisabledStyle>
</ISWebDesktop:WebButton>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<ISWebDesktop:WebContextMenu ID="_temp" runat="server">
<MenuStyleSettings MenuAnimation="true">
</MenuStyleSettings>
</ISWebDesktop:WebContextMenu>
</form>
</body>
</html>
dsEmedicSchedule1.vb

Imports Microsoft.VisualBasic
Imports System.Data.SqlClient

Imports System
Imports ISNet.WebUI.WebScheduler
Imports System.ComponentModel
Imports ISNet.Serialization
Imports System.Data
Imports System.IO
Imports System.Text
Imports System.Security.Cryptography
Imports System.Web.Security
Imports ISNet.WebUI
Imports Microsoft.VisualBasic.Information
Imports Microsoft.VisualBasic.Strings
Imports System.Configuration


Public Class AppointmentEvent
Inherits WebSchedulerEvent

Private _patientID As Integer = 0
Private _status As String = ""
Private _apointmentLocation As String = ""

<NotifyParentProperty(True), XmlSerializable(), BinarySerializable()> _
Public Property patientID() As Integer
Get
Return _patientID
End Get
Set(ByVal value As Integer)
_patientID = value
End Set
End Property

<NotifyParentProperty(True), XmlSerializable(), BinarySerializable()> _
Public Property status() As String
Get
Return _status
End Get
Set(ByVal value As String)
_status = value
End Set
End Property

Public Property apointmentLocation() As String
Get
Return _apointmentLocation
End Get
Set(ByVal value As String)
_apointmentLocation = value
End Set
End Property

End Class

Public Class apointmentResource
Inherits WebSchedulerResource




End Class


Namespace dsEmedicSchedule1TableAdapters

Partial Public Class LU_EventsTableAdapter
Inherits Global.System.ComponentModel.Component
Public Overloads Function Insert(ByVal EventID As Integer, ByVal CategoryID As String, ByVal ResourceID As Global.System.Nullable(Of Integer), ByVal Mode As Global.System.Nullable(Of Integer), ByVal Subject As String, ByVal Description As String, ByVal Location As String, ByVal AllDayEvent As Boolean, ByVal StartTime As Global.System.Nullable(Of Global.System.DateTime), ByVal EndTime As Global.System.Nullable(Of Global.System.DateTime), ByVal Reminder As Global.System.Nullable(Of Integer), ByVal patientID As Integer, ByVal status As String) As Integer
Try
Me.Connection = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("DSN"))
Me.Connection.Open()
Me.Insert(CategoryID, ResourceID, Mode, Subject, Description, Location, AllDayEvent, StartTime, EndTime, Reminder, patientID, status)
Dim command As SqlCommand = New SqlCommand
command.CommandText = "SELECT @@IDENTITY"
command.Connection = Me.Connection

Return CInt(Fix(command.ExecuteScalar()))

Catch ex As Exception
Me.Connection.Close()
End Try

End Function
End Class

Partial Public Class LU_RecurrenceEventsTableAdapter
Inherits Global.System.ComponentModel.Component
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, True)> _
Public Overloads Function Insert(ByVal EventID As Integer, ByVal RecurrenceID As Global.System.Nullable(Of Integer), ByVal CategoryID As String, ByVal ResourceID As Global.System.Nullable(Of Integer), ByVal ParentID As Global.System.Nullable(Of Integer), ByVal Mode As Global.System.Nullable(Of Integer), ByVal Subject As String, ByVal Description As String, ByVal Location As String, ByVal AllDayEvent As Boolean, ByVal StartTime As Global.System.Nullable(Of Global.System.DateTime), ByVal EndTime As Global.System.Nullable(Of Global.System.DateTime), ByVal ExceptionDate As Global.System.Nullable(Of Global.System.DateTime), ByVal ExceptionInfo As Global.System.Nullable(Of Integer), ByVal Reminder As Global.System.Nullable(Of Integer)) As Integer
Me.Connection = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("DSN"))
Me.Connection.Open()
Try
Me.Insert(RecurrenceID, CategoryID, ResourceID, ParentID, Mode, Subject, Description, Location, AllDayEvent, StartTime, EndTime, ExceptionDate, ExceptionInfo, Reminder)
Dim command As SqlCommand = New SqlCommand
command.CommandText = "SELECT @@IDENTITY"
command.Connection = Me.Connection
Return CInt(Fix(command.ExecuteScalar()))
Catch ex As Exception
Me.Connection.Close()
End Try
End Function



End Class

Partial Public Class LU_RecurrenceInfoTableAdapter
Inherits Global.System.ComponentModel.Component
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, True)> _
Public Overloads Function Insert(ByVal RecurrenceID As Integer, ByVal Mode As Global.System.Nullable(Of Integer), ByVal RangeMode As Global.System.Nullable(Of Integer), ByVal StartDate As Global.System.Nullable(Of Global.System.DateTime), ByVal EndDate As Global.System.Nullable(Of Global.System.DateTime), ByVal TotalRecurrences As Global.System.Nullable(Of Integer), ByVal NDay As Global.System.Nullable(Of Integer), ByVal NWeek As Global.System.Nullable(Of Integer), ByVal NMonth As Global.System.Nullable(Of Integer), ByVal NYear As Global.System.Nullable(Of Integer), ByVal WeekDays As String) As Integer
Me.Connection = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("DSN"))
Me.Connection.Open()
Try
Me.Insert(Mode, RangeMode, StartDate, EndDate, TotalRecurrences, NDay, NWeek, NMonth, NYear, WeekDays, 0, "a")
Dim command As SqlCommand = New SqlCommand
command.CommandText = "SELECT @@IDENTITY"
command.Connection = Me.Connection

Return CInt(Fix(command.ExecuteScalar()))
Catch ex As Exception
Me.Connection.Close()
End Try
End Function
End Class

Partial Public Class LU_CategoriesTableAdapter
Inherits Global.System.ComponentModel.Component
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, True)> _
Public Overloads Function Insert(ByVal CategoryID As Integer, ByVal CategoryName As String, ByVal Description As String, ByVal CategoryColor As String) As Integer
Me.Connection = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("DSN"))
Me.Connection.Open()

Try
Me.Insert(CategoryName, Description, CategoryColor)
Dim command As SqlCommand = New SqlCommand
command.CommandText = "SELECT @@IDENTITY"
command.Connection = Me.Connection

Return CInt(Fix(command.ExecuteScalar()))
Catch ex As Exception
Me.Connection.Close()
End Try
End Function
End Class

Partial Public Class LU_ResourcesTableAdapter
Inherits Global.System.ComponentModel.Component
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, True)> _
Public Overloads Function Insert(ByVal ResourceID As Integer, ByVal ResourceName As String, ByVal Description As String, ByVal Location As String, ByVal ResourceColor As String) As Integer


Me.Connection = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("DSN"))
Me.Connection.Open()

Try
Me.Insert(ResourceName, Description, Location, ResourceColor, 0)
Dim command As SqlCommand = New SqlCommand
command.CommandText = "SELECT @@IDENTITY"
command.Connection = Me.Connection
'Me.GetData()
'Me.GetData()
Return CInt(Fix(command.ExecuteScalar()))
Catch ex As Exception
Me.Connection.Close()
End Try
End Function

<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], True)> _
Public Overloads Function GetData(ByVal location As String) As dsEmedicSchedule1.LU_ResourcesDataTable
Dim myCommand As New SqlCommand
'myCommand.CommandText = "SELECT ID, ResourceName, Description, Location, ResourceColor, employeeID FROM dbo.LU_Resources WHERE Location LIKE '" & location & "'"
If location = "All" Then
myCommand.CommandText = "SELECT ID, ResourceName, Description, Location, ResourceColor, employeeID FROM dbo.LU_Resources"
Else
myCommand.CommandText = "SELECT ID, ResourceName, Description, Location, ResourceColor, employeeID FROM dbo.LU_Resources WHERE Location LIKE '" & location & "'"
End If

myCommand.Connection = Me.Connection
myCommand.CommandType = Global.System.Data.CommandType.Text
Me.Adapter.SelectCommand = myCommand
Dim dataTable As dsEmedicSchedule1.LU_ResourcesDataTable = New dsEmedicSchedule1.LU_ResourcesDataTable
Me.Adapter.Fill(dataTable)
Return dataTable
End Function


End Class

Partial Public Class LU_EmployeeTableAdapter
Inherits Global.System.ComponentModel.Component

<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], True)> _
Public Overloads Function GetData(ByVal location As String) As dsEmedicSchedule1.LU_EmployeeDataTable
Dim myCommand As New SqlCommand
location = "All"
If location = "All" Then
myCommand.CommandText = "SELECT Employee_ID,ISNULL(First_Name,'') + ' ' + ISNULL(Last_Name,'') AS 'User_ID',Credentials,Location,ResourceColor" & _
"FROM LU_Employee"
Else
'myCommand.CommandText = "SELECT [Employee_ID],[First_Name] + ' ' + [Last_Name] AS 'User_ID',[Credentials],[Location],[ResourceColor] " & _
'"FROM [dbo].[LU_Employee]"
myCommand.CommandText = "SELECT Employee_ID,ISNULL(First_Name,'') + ' ' + ISNULL(Last_Name) AS 'name',Credentials,Location,ResourceColor " & _
"FROM dbo.LU_Employee WHERE Location LIKE '" & location & "'"

'myCommand.CommandText = "SELECT [Employee_ID],[First_Name] + ' ' +[Last_Name] AS 'User_ID',[Credentials],[Location],[ResourceColor]" & _
'"FROM [dbo].[LU_Employee] WHERE ([Employee_ID]<15 OR [Employee_ID]>135)"
End If



myCommand.Connection = Me.Connection
myCommand.CommandType = Global.System.Data.CommandType.Text
Me.Adapter.SelectCommand = myCommand
Dim dataTable As dsEmedicSchedule1.LU_EmployeeDataTable = New dsEmedicSchedule1.LU_EmployeeDataTable
Me.Adapter.Fill(dataTable)
Return dataTable
End Function



End Class

End Namespace



All times are GMT -5. The time now is 2:34 PM.
Previous Next