or
<
asp:SqlDataSource
ID
=
"dsLTDist0"
runat
=
"server"
ConflictDetection
=
"CompareAllValues"
ConnectionString="<%$ ConnectionStrings:Tech-InnovationsConnectionString %>"
DeleteCommand="DELETE FROM [Appointments] WHERE [ID] = @original_ID"
InsertCommand="INSERT INTO [Appointments] ([Subject], [Unit], [Area], [Vehicle], [Status], [Hours], [Comments],[Start],[End],[District]) VALUES (@Subject, @Unit, @Area, @Vehicle, @Status, @Hours, @Comments,@Start,@End,@District)"
OldValuesParameterFormatString="original_{0}"
SelectCommand="SELECT [ID], [Subject], [Unit], [Area], [Vehicle], [Status], [Hours], [Comments] FROM [Appointments]"
UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Unit] = @Unit, [Area] = @Area, [Vehicle] = @Vehicle, [Status] = @Status, [Hours] = @Hours, [Comments] = @Comments WHERE [ID] = @original_ID AND [Subject] = @original_Subject AND (([Unit] = @original_Unit) OR ([Unit] IS NULL AND @original_Unit IS NULL)) AND (([Area] = @original_Area) OR ([Area] IS NULL AND @original_Area IS NULL)) AND (([Vehicle] = @original_Vehicle) OR ([Vehicle] IS NULL AND @original_Vehicle IS NULL)) AND (([Status] = @original_Status) OR ([Status] IS NULL AND @original_Status IS NULL)) AND (([Hours] = @original_Hours) OR ([Hours] IS NULL AND @original_Hours IS NULL)) AND (([Comments] = @original_Comments) OR ([Comments] IS NULL AND @original_Comments IS NULL))">
<
DeleteParameters
>
<
asp:Parameter
Name
=
"original_ID"
/>
</
DeleteParameters
>
<
InsertParameters
>
<
asp:Parameter
Name
=
"Subject"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Unit"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Area"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Vehicle"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Status"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Hours"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Comments"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Start"
Type
=
"datetime"
/>
<
asp:Parameter
Name
=
"End"
Type
=
"datetime"
/>
<
asp:Parameter
Name
=
"District"
Type
=
"int32"
/>
</
InsertParameters
>
<
UpdateParameters
>
<
asp:Parameter
Name
=
"Subject"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Unit"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Area"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Vehicle"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Status"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Hours"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"Comments"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"original_ID"
Type
=
"Int32"
/>
<
asp:Parameter
Name
=
"original_Subject"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"original_Unit"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"original_Area"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"original_Vehicle"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"original_Status"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"original_Hours"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"original_Comments"
Type
=
"String"
/>
</
UpdateParameters
>
</
asp:SqlDataSource
>
<
ItemTemplate
>
<
tr
class
=
"rlvI"
>
<
td
>
<
asp:Button
ID
=
"EditButton"
runat
=
"server"
CausesValidation
=
"False"
CommandName
=
"Edit"
CssClass
=
"rlvBEdit"
Text
=
" "
ToolTip
=
"Edit"
/>
</
td
>
<
td
>
<
asp:Label
ID
=
"SubjectLabel"
runat
=
"server"
width
=
"170"
Text='<%# Eval("Subject") %>' />
</
td
>
<
td
>
<
asp:Label
ID
=
"UnitLabel"
runat
=
"server"
width
=
"70"
Text='<%# Eval("Unit") %>' />
</
td
>
<
td
>
<
asp:Label
ID
=
"AreaLabel"
runat
=
"server"
width
=
"70"
Text='<%# Eval("Area") %>' />
</
td
>
<
td
>
<
asp:Label
ID
=
"VehicleLabel"
runat
=
"server"
width
=
"70"
Text='<%# Eval("Vehicle") %>' />
</
td
>
<
td
>
<
asp:Label
ID
=
"HoursLabel"
runat
=
"server"
width
=
"80"
Text='<%# Eval("Hours") %>' />
</
td
>
<
td
>
<
asp:Label
ID
=
"StatusLabel"
runat
=
"server"
width
=
"100"
Text='<%# Eval("Status") %>' />
</
td
>
<
td
>
<
asp:Label
ID
=
"CommentsLabel"
runat
=
"server"
width
=
"200"
Text='<%# Eval("Comments") %>' />
</
td
>
<
td
>
<
asp:Button
ID
=
"btnDel"
runat
=
"server"
CausesValidation
=
"False"
CommandName
=
"Delete"
CssClass
=
"rlvBDel"
Text
=
" "
ToolTip
=
"Delete this Record"
/>
</
td
>
</
tr
>
</
ItemTemplate
>
<
link
rel
=
"Stylesheet"
type
=
"text/css"
href
=
"Styles/Skins/VistaSolid/Window.VistaSolid.css"
/>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
Skin
=
"VistaSolid"
VisibleStatusbar
=
"false"
EnableEmbeddedSkins
=
"false"
Behaviors
=
"Close, Move, Resize"
runat
=
"server"
OnClientPageLoad
=
"SetWindowManagerSize"
OnClientDragStart
=
"WindowDragStart"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"PartsListWindow"
runat
=
"server"
Behaviors
=
"Close, Move, Resize"
EnableEmbeddedSkins
=
"false"
NavigateUrl
=
"../Editor.aspx"
Skin
=
"VistaSolid"
Height
=
"275px"
Width
=
"350px"
ShowContentDuringLoad
=
"false"
style
=
"z-index:5001; overflow:hidden;"
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
<
telerik:RadGrid
ID
=
"gvPhoneInq"
runat
=
"server"
CellSpacing
=
"0"
GridLines
=
"None"
AllowSorting
=
"True"
AllowFilteringByColumn
=
"True"
AllowPaging
=
"True"
AutoGenerateColumns
=
"False"
OnNeedDataSource
=
"gvPhoneInq_NeedDataSource"
OnItemCommand
=
"gvPhoneInq_ItemCommand"
OnSelectedIndexChanged
=
"gvPhoneInq_SelectedIndexChanged"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
/>
<
GroupingSettings
CaseSensitive
=
"false"
/>
<
ClientSettings
EnablePostBackOnRowClick
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
/>
</
ClientSettings
>
<
MasterTableView
CommandItemDisplay
=
"Top"
NoMasterRecordsText
=
"No Phone enquiry records exist!"
CommandItemStyle-BackColor
=
"lightblue"
CommandItemStyle-Font-Bold
=
"true"
GridLines
=
"None"
DataKeyNames
=
"Ph_EnqID"
>
<
Columns
>
<
telerik:GridBoundColumn
HeaderText
=
"Mobile No"
UniqueName
=
"Ph_PhNo"
DataField
=
"Ph_PhNo"
>
<
FilterTemplate
>
<
telerik:RadTextBox
ID
=
"RTMob"
runat
=
"server"
Width
=
"200px"
ClientEvents-OnValueChanged
=
"ValueChanged1"
></
telerik:RadTextBox
>
<
telerik:RadScriptBlock
ID
=
"RBMob"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function ValueChanged1(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
var Name = $find('<%# ((GridItem)Container).FindControl("RTMob").ClientID %>');
tableView.filter("Ph_PhNo", Name, "EqualTo");
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
UniqueName
=
"EditCo
mmandColumn1"
></
EditColumn
>
</
EditFormSettings
>
<
CommandItemStyle
BackColor
=
"LightBlue"
Font-Bold
=
"True"
></
CommandItemStyle
>
</
MasterTableView
>
</
telerik:RadGrid
>
protected
void
gvPhoneInq_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
_phoneEnqServices =
new
PhoneEnqServices();
gvPhoneInq.DataSource = _phoneEnqServices.GetAllPatients(search);
}
protected
void
gvPhoneInq_ItemCommand(
object
sender, GridCommandEventArgs e)
{
if
(e.CommandName == RadGrid.FilterCommandName)
{
Pair filterPair = (Pair)e.CommandArgument;
switch
(filterPair.Second.ToString())
{
case
(
"Ph_PhNo"
):
{
flagD = 0;
RadTextBox searchMob = (e.Item
as
GridFilteringItem)[filterPair.Second.ToString()].FindControl(
"RTMob"
)
as
RadTextBox;
search =
" where Ph_PhNo ='"
+ searchMob.Text +
"'"
;
break
;
}
}
}
}
<
telerik:RadEditor
TableLayoutCssFile
=
"/_layouts/1045/STYLES/tableStyles.css"
... />
<
configuration
>
<
property
name
=
"TableLayoutCssFile"
>/_layouts/1045/STYLES/tableStyles.css</
property
>
</
configuration
>