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

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

    <div class='divtable'>
        <asp:HiddenField ID="hdnWidth" runat="server" />
        <asp:HiddenField ID="hdnHeight" runat="server" />
        <asp:HiddenField ID="hdnRecordKeyId" 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-2'>
                            <asp:Button ID="btnSave" runat="server" Text="Update" OnClick="SaveData" CssClass="myButton" ToolTip="Update" />
                        </div>
                    </div>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                <div class="form-horizontal">
                    <div class="box-body">
                        <div class="form-group">
                            <asp:Label ID="Label1" runat="server" Text="Company Name*" class="col-sm-2 control-label"></asp:Label>
                            <div class="col-sm-5">
                                <asp:TextBox runat="server" ID="txtCompanyName" MaxLength="100" class="form-control" />
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtCompanyName"
                                    CssClass="text-alert" ErrorMessage="Company Name field is required." />
                            </div>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label2" runat="server" Text="Address*" class="col-sm-2 control-label"></asp:Label>
                            <div class="col-sm-5">
                                <asp:TextBox TextMode="MultiLine" Height="60px" MaxLength="500" runat="server" ID="txtCompanyAddress" class="form-control" />
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtCompanyAddress"
                                    CssClass="text-alert" ErrorMessage="Company Address field is required." />
                            </div>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label3" runat="server" Text="Logo" class="col-sm-2 control-label"></asp:Label>
                            <div class="col-sm-5">
                                <asp:Image ID="imgLogo" runat="server" Height="75px" maxwidth="150px"
                                    BorderStyle="Ridge" BorderWidth="1" class="form-control" />

                            </div>
                            <div class="col-sm-5">
                                <asp:Label ID="Label6" runat="server" Text="In case your logo is not updated then clear your cache." CssClass="control-label"></asp:Label>
                            </div>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label4" runat="server" Text="" class="col-sm-2 control-label"></asp:Label>
                            <div class="form-group">
                                <div class="col-sm-5">
                                    <asp:Label ID="lblImgMsg" runat="server" class="col-sm-13 control-label"></asp:Label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label5" runat="server" Text="" class="col-sm-2 control-label"></asp:Label>
                            <div class="form-group">
                                <div class="col-sm-5">
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
                                        <ContentTemplate>
                                            <asp:FileUpload ID="FileUpload1" runat="server" CssClass="myButton" />
                                            <br />
                                            <asp:Button ID="btnUploadFile" runat="server" Text="Upload File" Visible="false" OnClick="UploadFile" CssClass="myButton" />
                                            <asp:RequiredFieldValidator ID="FileUploadValidator" runat="server" ControlToValidate="FileUpload1"
                                                CssClass="text-alert" ErrorMessage="Please select file for upload." /><br />
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ValidationExpression="([a-zA-Z0-9\s_\\.\-:])+(.jpg|.png)$"
                                                ControlToValidate="FileUpload1" runat="server" CssClass="text-alert" ErrorMessage="Please select a valid Jpg or Png file."
                                                Display="Dynamic" />
                                            <asp:Label ID="lblFileSizeError" runat="server" Text="" CssClass="text-alert"></asp:Label>
                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:PostBackTrigger  ControlID="btnSave" />
                                        </Triggers>
                                    </asp:UpdatePanel>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
