
| <asp:TemplateField HeaderText="Par" ItemStyle-HorizontalAlign="center" HeaderStyle-Width="29px" |
| ItemStyle-Width="29px" > |
| <ItemTemplate> |
| <telerik:radnumerictextbox runat="server" id="txtSinglePar" width="25px" onfocus="HasFocus(this)" |
| emptymessage="Par"> |
| <ClientEvents OnKeyPress="MoveToNextTextBox" /> |
| <NumberFormat DecimalDigits="0" GroupSeparator="" /> </telerik:radnumerictextbox> |
| </ItemTemplate> |
| </asp:TemplateField> |
| function HasFocus(TextBox) { |
| textBoxWithFocus = TextBox; |
| } |
| function MoveToNextTextBox(sender, args) |
| { |
| //IF TAB KEY HAS BEEN PRESSED |
| if (args.get_keyCode() == 9) |
| { |
| var str = textBoxWithFocus.id.replace("_text", ""); |
| var id = str.substring(str.indexOf("_ctl"), str.indexOf("_txt")); |
| //GET THE NUMBER OF THE ROW IN GRIDVIEW |
| idid = id.replace("_ctl", ""); |
| newId = parseFloat(id) + parseFloat(01); |
| if (parseInt(newId) < 9) { |
| newId = "0" + newId; |
| } |
| var prevID = str.replace(id, newId); |
| if (parseFloat(id) < 9) |
| { |
| prevIDprevID = prevID.replace("_ctl", "_ctl0"); |
| prevIDprevID = prevID.replace("_ctl00", "_ctl0"); |
| } |
| var newCtl = document.getElementById(prevID); |
| if (newCtl != null && $find(newCtl.id) != null) |
| { |
| $find(newCtl.id).focus(); |
| } |
| args.set_cancel(true); |
| } |
| } |
| <telerik:RadGrid ID="gvTrackers" Height="560px" runat="server" AllowPaging="true" AllowSorting="True" |
| GridLines="None" AutoGenerateColumns="true" ShowGroupPanel="True" EnableHeaderContextMenu="true" |
| EnableHeaderContextFilterMenu="true" AllowMultiRowSelection="true" AllowFilteringByColumn="True" |
| OnNeedDataSource="gvTrackers_NeedDataSource" OnItemCreated="gvTrackers_ItemCreated" |
| OnExcelMLExportStylesCreated="gvTrackers_ExcelMLExportStylesCreated" OnExcelMLExportRowCreated="gvTrackers_ExcelMLExportRowCreated" |
| OnItemCommand="gvTrackers_ItemCommand" > |
| <HeaderStyle Height="40px" Width="100px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White" |
| HorizontalAlign="Right" BorderColor="white" BorderWidth="1px" /> |
| <ExportSettings IgnorePaging="true" ExportOnlyData="true"> |
| <Pdf AllowModify="false" AllowPrinting="true" PageWidth="16in" /> |
| </ExportSettings> |
| <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top"> |
| <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" |
| ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" /> |
| </MasterTableView> |
| <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
| <Selecting AllowRowSelect="True"></Selecting> |
| <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" |
| ResizeGridOnColumnResize="False"></Resizing> |
| </ClientSettings> |
| <GroupingSettings ShowUnGroupButton="true" /> |
| <PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" Font-Bold="true" AlwaysVisible="true" /> |
| </telerik:RadGrid> |
| string script = @"var oWindowMsg = top.window.radopen('Hello World', null); |
| oWindowMsg.setSize(200, 200); |
| oWindowMsg.set_modal(true); |
| oWindowMsg.set_visibleStatusbar(false); |
| oWindowMsg.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close); |
| oWindowMsg.add_pageLoad(function () { oWindowMsg.autoSize(true) });"; |
| if (RadScriptManager.GetCurrent(this).IsInAsyncPostBack) |
| { |
| RadAjaxManager.GetCurrent(this).ResponseScripts.Add(script); |
| } |
| else |
| { |
| this.ClientScript.RegisterStartupScript(this.GetType(), "mostrarMensaje", String.Format("<script language='javascript'>function f(){{{0}; Sys.Application.remove_load(f);}}; Sys.Application.add_load(f);</script>", script)); |
| } |

| <script type="text/javascript" language="javascript"> |
| function onFocus(sender, args) |
| { |
| var cell = sender.get_element().parentNode.parentNode; |
| alert(cell.parentNode.rowIndex); |
| } |
| </script> |
<input type="file"
style="width: 95%"Text=" Upload "
runat="server"
ToolTip="Click to upload file."
CssClass="Button">
</asp:button>
</td>
<radU:RadProgressManager ID="RadProgressManager1" runat="server" UniquePageIdentifier="eae0adf1-8382-4884-8843-a38bf3b99b38" />
<radU:RadProgressArea ID="RadProgressArea1" runat="server">
</radU:RadProgressArea>
</td>
'Store current user token in a variable...
Dim tokenCurrentUser As System.IntPtr = System.Security.Principal.WindowsIdentity.GetCurrent.Token
Try
file = RadUploadContext.Current.UploadedFiles(inputFile.UniqueID)
'validating
If validating() = False Then
Exit Sub
End If
fileName = file.GetName
fileExt = file.GetExtension
filesize = file.ContentLength
'Impersonate ASPNETRW account ...
Dim szASPNETRWPassword As String = Trim(All.DecryptPassWord(Trim(ConfigurationManager.AppSettings("ASPNETRWPassWord"))))
If Not ImpersonateUser.ImpersonateValidUser("aspnetrw", "HCA_LAN", szASPNETRWPassword) Then
'Notify user of error...
ClientScripts.CallMsgBox(
Me, "Error", "Sorry, unable to access archive at this time.")
Exit Sub
End If
file.SaveAs(ConfigurationManager.AppSettings(
"UploadFilePath") & fileName)
'update database
NewPHI_Request()
'send email notice
sendMail()
Response.Redirect("xThankyou.aspx", False)
Catch ex As Exception
Try
'pass error to web service...
xLogError.LogError(ex.Message, ex.StackTrace)
Catch exLogError As Exception
End Try
'place error message into session and redirect to error page...
Session.Item(
"ErrorMessage") = ex.Message.ToString()
Response.Redirect(
"xError.aspx", False)
Finally
'Set impersonation back to previous user...
ImpersonateUser.UndoImpersonation()
System.Security.Principal.WindowsIdentity.Impersonate(tokenCurrentUser)
End Try
End Sub