<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Import_Files.aspx.cs" Inherits="Neclog_3_0.Import_Files" %>

<%@ Register Src="~/UserControls/ucSearchControl.ascx" TagName="ucSearchControl" TagPrefix="ucSearch" %>
<%@ Register TagPrefix="atv" Namespace="AdamTibi.Web.UI.Validators"
    Assembly="AdamTibi.Web.UI.Validators" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class='divtable'>
        <asp:HiddenField ID="hdnImportFilePath" runat="server" />
        <div class='form-box'>
            <div class="box box-success">
                <div class="box-header with-border">
                    <div class='row'>
                        <div class='col-md-10'>
                            <asp:Label ID="lblTitle" runat="server" class="box-title"></asp:Label>
                        </div>
                        <div class='col-md-1'>
                            <asp:Button ID="btnSave" ValidationGroup="Save" OnClick="btnSave_Click" runat="server" Text="Upload Files" CssClass="myButton" ToolTip="Upload Files" />
                        </div>
                    </div>
                </div>
                <!-- /.box-header -->
                <!-- form start -->

                <div class="form-horizontal">
                    <div class="box-body" id="divFormContent" runat="server">
                        <div class="form-group">
                            <asp:Label ID="lblInstrumentName" runat="server" class="col-sm-2 control-label" Text="Instrument*"></asp:Label>
                            <div class="col-sm-5">
                                <asp:DropDownList runat="server" ID="ddlInstrumentName" CssClass="form-control"></asp:DropDownList>
                            </div>
                            <div class="col-sm-5">
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlInstrumentName" ValidationGroup="Save"
                                    CssClass="text-alert" ErrorMessage="Intrument Name field is required." />
                            </div>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="lblFileType" runat="server" class="col-sm-2 control-label" Text="File Type*"></asp:Label>
                            <div class="col-sm-5">
                                <asp:DropDownList runat="server" ID="ddlFileType" CssClass="form-control"></asp:DropDownList>
                            </div>
                            <div class="col-sm-5">
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlFileType" ValidationGroup="Save"
                                    CssClass="text-alert" ErrorMessage="FIle Type field is required." />
                            </div>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label1" runat="server" Text="Select Files" class="col-sm-2 control-label"></asp:Label>
                            <div class="col-sm-5">
                                <asp:UpdatePanel runat="server" UpdateMode="Always">
                                    <ContentTemplate>
                                        <asp:FileUpload ID="FileUpload1" runat="server" accept=".NEC" CssClass="myButton" ViewStateMode="Enabled" AllowMultiple="true" />
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:PostBackTrigger ControlID="btnSave" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </div>
                            <div class="col-sm-5">
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="FileUpload1" ValidationGroup="Save"
                                    CssClass="text-alert" ErrorMessage="Please select the files." />
                                <asp:RegularExpressionValidator ErrorMessage="Please select valid files (.NEC)." ValidationGroup="Save" ControlToValidate="FileUpload1"
                                    CssClass="text-alert" ValidationExpression="([a-zA-Z0-9\s_\\.\-:])+(.NEC)" runat="server" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>


</asp:Content>
