Zusätzliche Änderungen

This commit is contained in:
ja
2021-11-04 14:08:21 +01:00
parent e3283a452a
commit 6edd778e6b
4 changed files with 146 additions and 81 deletions

View File

@@ -41,8 +41,43 @@
<h2 style="font-style:italic"><%=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 alle deine Daten zusammengefasst auf einer Seite.</h3>
<asp:Label ID="Label3" runat="server" Text="Kundennr.: 045112"></asp:Label>
<h5 style="font-size:1.1225em">Kundennr.: <%=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;">
@@ -64,8 +99,8 @@
<div class="carousel-item active">
<a href="Invoices.aspx"> <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"><h5 style="opacity:100%">Rechnungen</h5></a>
<a href="Invoices.aspx"> <p style="color:#fff;opacity:100%">Hier erfahren sie alles über Ihre Rechnungen.</p></a>
<a href="Invoices.aspx?P1=<%=CustomerID %>"><h5 style="opacity:100%">Rechnungen</h5></a>
<a href="Invoices.aspx?P1=<%=CustomerID %>"><p style="color:#fff;opacity:100%">Hier erfahren sie alles über Ihre Rechnungen.</p></a>
</div>
</div>
<div class="carousel-item">