Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using ClassLibrary1.Repositories;
- using System.Configuration;
- namespace ClockWize
- {
- public partial class Login : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- string username = TextBoxUserName.Text;
- string password = TextBoxPassword.Text;
- string conn = ConfigurationManager.ConnectionStrings["connectionDatabas"].ToString();
- UserSQL repos = new UserSQL();
- int userId = repos.UserFound(username, password);
- if (userId != -1)
- {
- Session["authenticated"] = true;
- Session["userid"] = userId;
- Session["cart"] = new Cart();
- Response.Redirect("Default.aspx");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement