<%@ Page Title="Welcome VERAG SPEDITION AG " Language="VB" MasterPageFile="~/Customers/Customers.master" AutoEventWireup="false" CodeFile="Welcome.aspx.vb" Inherits="Welcome" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <!-- Bootstrap -->
    <html lang="en"></html>
    <!-- Required meta tags -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1" title="Verag Spedition AG AvisoTV Flex"/>   
    
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" title="VERAG IndexCustomer"/>            
     <link rel="shortcut icon" href="images/Icons/favicon/favicon.ico" />
    <!--    <link rel="stylesheet" type="text/css" href="css/edit_main.css"> -->
    <script src="js/netzwerk.js" type="text/javascript"></script> 
    
   <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"/>
  
    <link rel="stylesheet" type="text/css" href="../css/main.css"/>
    <link rel="stylesheet" type="text/css" href="../css/style.css"/>

    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/Dropdown.css"/>
      <!--   <link rel="stylesheet" type="text/css" href="../css/style.css"/>-->
    <link rel="stylesheet" type="text/css" href="../css/Customers/MasterpageCustomers.css"/>              
    <link rel="stylesheet" type="text/css" href="../css/Customers/Welcome.css"/> 
    <link rel="stylesheet" type="text/css" href="../css/navbarsidebar2.css"/>          
    <style>
        @media (max-width: 558.98px) {
            body {
                max-width: 390px;
            }

            h1 {
                color: #043381;
                font-size: 22px;
            }

            h2 {
                color: #043381;
                font-size: 28px;
            }
            @media (max-width: 349.98px) {
            body {
                max-width: 349.98px;
            }

            h1 {
                color: #043381;
                font-size: 22px;
            }

            h2 {
                color: #043381;
                font-size: 28px;
            }
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <asp:ScriptManager ID="script6" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="panelupdate6" runat="server"><ContentTemplate> 
        <h1>Hauptseite Kunden:</h1>
        <div style="width:20px;"></div>
    <div style="white-space:nowrap">
        <h1>Herzlich Willkommen       
        <div id="Ueberschrift2">
            <h2 style="font-style:italic"><%Response.Write(Page.User.Identity.Name)%></h2>
        </div></h1> 
   </div>
        <%@ import Namespace="MySql.Data.MySqlClient"%>
    <%@import Namespace="System.Data.SqlClient" %>
        <%
            Dim Connectionstring As String = String.Empty
            Dim username As String = Me.Page.User.Identity.Name
            Dim lastloggedin As String = String.Empty
            Dim createdUserDate As String = String.Empty
            Dim emailuser As String = String.Empty
            Dim CustomerID As String = String.Empty

            If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
                'ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=sa;Pwd=BmWr501956"
                Connectionstring = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
            Else
                Connectionstring = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
                'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
            End If
            ' Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
            Using con As New SqlConnection(Connectionstring)
                ' Using cmd As New SqlCommand("Validate_User")
                Using cmd As New SqlCommand("SELECT Username,Email,LastLoginDate,CreatedDate,KundenNr FROM [VERAG_HOMEPAGE].[dbo].[Users] WHERE Username=@Username")
                    ' cmd.CommandType = CommandType.StoredProcedure
                    cmd.Parameters.AddWithValue("@Username", username)
                    cmd.Connection = con
                    con.Open()
                    'userId = Convert.ToInt32(cmd.ExecuteScalar())
                    Dim dr As SqlDataReader = cmd.ExecuteReader()
                    If dr.Read() Then
                        username = dr("Username").ToString()
                        CustomerID = dr("KundenNr").ToString
                    End If
                End Using
                con.Close()
            End Using
%>
    <h3>Hier findest Du all deine Daten zusammengefasst auf einer Seite.</h3>
        <h5 style="font-size:1.1225em">Kundennr.: <%Response.Write(CustomerID)%></h5>
        <asp:Label ID="Label2" runat="server" Text="Bereich: "></asp:Label>
        <asp:Label ID="Label1" runat="server" Text="Mitarbeiter "></asp:Label>
        <div style="height:25px;padding:7.5px 0;">
            <h1>News für dich:</h1>                                                 
        </div>
                                                <!--<br><br>
                                                Die Mitarbeiter der VERAG Spedition AG haben sich auf die Bereiche Zoll und Steuer spezialisiert und können so ihren Kunden einen individuell abgestimmten Service anbieten.
                                                <br><br>
                                                Nehmen Sie sich etwas Zeit, um sich über unser umfangreiches Dienstleistungsangebot zu informieren! -->
                                                <br/><br/><br/>
            <div class="container" style="width:88%;">
                                                   <div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel" data-interval="200">
                                                      <div class="carousel-indicators">
                                                        <button type="button" data-bs-target="#carouselExampleIndicators"  data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
                                                        <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1" aria-label="Slide 2"></button>
                                                        <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2" aria-label="Slide 3"></button>
                                                      </div>
                                                      <div class="carousel-inner">
                                                        <div class="carousel-item active">
                                                      <a href="Invoices.aspx?P1=<%Response.Write(CustomerID)%>"> <img src="../images/pics/pexels-kampus-production-7477713.jpg" id="imgcar" style="width: 100%" alt="First slide"></a>
                                                            <div class="carousel-caption d-block d-md-block" style="background:linear-gradient(to right, #003680 , #0055cc);opacity:80%;height:auto">
                                                       <a href="Invoices.aspx?P1=<%Response.Write(CustomerID)%>"><h5 style="opacity:100%">Rechnungen</h5></a>
                                                       <a href="Invoices.aspx?P1=<%Response.Write(CustomerID)%>"><p style="color:#fff;opacity:100%">Hier erfahren sie alles über Ihre Rechnungen.</p></a>
                                                      </div>
                                                        </div>
                                                        <div class="carousel-item">
                                                        <a href="CustomsAviso.aspx?P1=<%Response.Write(CustomerID)%>"><img src="../images/pics/pexels-photoscom-93398.jpg" id="imgcar" style="width: 100%" alt="Second slide"></a>
                                                            <div class="carousel-caption d-block d-md-block" style="background:linear-gradient(to right, #003680 , #0055cc);opacity:80%;height:auto">
                                                     <a href="CustomsAviso.aspx?P1=<%Response.Write(CustomerID)%>"> <h5 style="opacity:100%">Kundenseite</h5></a>
                                                      <a href="CustomsAviso.aspx?P1=<%Response.Write(CustomerID)%>"><p style="color:#fff;opacity:100%">Hier beginnt alles mit Ihren Aufträgen.</p></a>
                                                      </div>
                                                        </div>
                                                        <div class="carousel-item">
                                                          <a href="Welcome.aspx"><img  src="../images/pics/pexels-jopwell-2422293.jpg" id="imgcar" style="width: 100%" alt="Third slide"></a>
                                                            <div class="carousel-caption d-block d-md-block" style=" background: linear-gradient(to right, #003680, #0055cc);opacity: 80%;height: auto">
                                                       <a href="Welcome.aspx"><h5 style="opacity:100%">Startseite</h5></a>
                                                      <a href="Welcome.aspx"><p style="color:#fff;opacity:100%">Der Einstieg zu Ihrem Profil.</p></a>
                                                      </div>
                                                        </div>
                                                      </div>
                                                      <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
                                                    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                                                    <span class="visually-hidden"><<</span>
                                                  </button>
                                                  <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
                                                    <span class="carousel-control-next-icon" aria-hidden="true"></span>
                                                    <span class="visually-hidden">>></span>
                                                  </button>
                                                   </div>
                </div>          
         <div style="height:/*140px*/15.069967707212056vh;"></div>   
        </ContentTemplate></asp:UpdatePanel>
</asp:Content>