<%@ page language="C#" %>
<html  xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Translator page</title>
<script language="javascript" type="text/javascript">
//window.open("Default.aspx","Translatorpage","toolbar=no,menubar=yes,directories=yes,status=yes,scrollbars=yes,resizable,left=0,top=0,width=1010,height=700");
//self.focus();
//window.opener = null;
//window.close();
//window.onblur = function() {
//        window.close();
//      }

</script>

<script language='vbscript' type="text/vbscript">
<!--
   strAddFileInput = "<input type='file' name='fileFigure' style='{width: 100%;}' onchange='ChangeInputFile(this)' />"
   
   Sub AddInputFile()
      nCount = tabUploadFile.rows.length

      For i = 1 To nCount - 1
       If Len(tabUploadFile.rows(i).cells(1).all("fileFigure").value) = 0 Then
        Exit Sub
       End If
      Next
      
      Set nowTR = tabUploadFile.insertRow
      With nowTR
         .insertCell
         .insertCell
         
         With .cells(0)
            .innerText = "·s¼WÀÉ®× " & nCount
'            .className = "tdGrid"
         End With
                  
         With .cells(1)
            .innerHTML = strAddFileInput
'            .className = "tdGrid"
         End With
      End With
   End Sub
   
   Sub ChangeInputFile(Byval objInputFile)
      If Len(objInputFile.value) > 0 Then
         AddInputFile
      End If      
   End Sub
   
   Sub window_onload()
'      With tabDeleteFile.rows
'         If .length > 1 Then
'            .item(1).cells(2).all(0).style.visibility = "hidden"
'            .item(.length - 1).cells(2).all(1).style.visibility = "hidden"
'         End If
'      End With
      
      AddInputFile      
   End Sub
   
   Sub cmdOK_onclick()
      strFilter = ""
'      With tabDeleteFile.rows
'         For ibr = 1 To .length - 1
'            With .item(ibr).cells(0).all(0)
'               If .checked = False Then
'                  strFilter = strFilter & .value & ";"
'               End If
'            End With
'         Next
'      End With

      With tabUploadFile.rows
         For ibr = 1 To .length - 1
            With .item(ibr).cells(1).all(0)
               strFile = .value
               If Len(strFile) > 0 Then
                  strFile = Mid(strFile, InStrRev(strFile, "\") + 1)
                  strFilter = strFilter & strFile & ";"
               End If
            End With
         Next
      End With
      
'      With frmManage
'         If Len(strFilter) > 0 Then
'            strFilter = UrlEncode(Left(strFilter, Len(strFilter) - 1))
'         End If
'         sUrl = document.url 
'         sUrl = SetUrlStringValue(sUrl, "Filter", strFilter)
'         .action = sUrl
'         .submit
'      End With
      
   End Sub


-->
  </script>
</head>

<body onload="window_onload()">
  <form id="Form1" runat="server">

    <asp:sqldatasource
      id="SqlDataSource1"
      runat="server"
      connectionstring="<%$ ConnectionStrings:ConnString_WEBSecurity%>"
      selectcommand="Select * From SEST.dbo.HR_Departments">
    </asp:sqldatasource>

    <asp:detailsview
      id="DetailsView1"
      runat="server"
      allowpaging="True"
      datasourceid="SqlDataSource1"
      height="208px"
      width="264px"
      autogeneraterows="False">
        <fields>

          <asp:boundfield
            sortexpression="DeptID"
            datafield="DeptID"
            headertext="DeptID">
              <itemstyle backcolor="Yellow">
              </itemstyle>
          </asp:boundfield>

          <asp:boundfield
            sortexpression="Name"
            datafield="Name"
            headertext="Name">
              <itemstyle forecolor="#C00000">
              </itemstyle>
          </asp:boundfield>

          <asp:buttonfield
            text="TestButton"
            buttontype="Button">
          </asp:buttonfield>

        </fields>
    </asp:detailsview>


<table id="tabUploadFile" width="500px">

</table>
  </form>
</body>
</html>

