Exemple #1
0
      protected void Page_Load(object sender, EventArgs e) {
         var user = new User();
         user.Email = email.Value;
         user.PhoneNumber = userPhoneNumber.Value;
         user.Name = userName.Value;

         if (user.Name != null) {

         }

         Debug.WriteLine(user.Email);
         Debug.WriteLine(user.PhoneNumber);

         //User currentUser;
         //if(Session["user"] != null) {
         //   currentUser = (User)(Session["user"]);
         //}
         //else {
         //   currentUser = new User();
         //   currentUser.secretInt = new Random().Next(1000);
         //   currentUser.Hits += 1;
         //   Session["user"] = currentUser;

         //}
         //hits.InnerText = currentUser.Hits.ToString();
         //sessionId.InnerText = currentUser.secretInt.ToString();
         //Debug.WriteLine(currentUser.secretInt);
         //Debug.WriteLine(currentUser.Hits);
      }
 public object Post(RegistrationRequest request)
 {
     //sprawdzenie czy user jest w bazie danych
     //wstawienei do bazy danych
     //odpowiedz do frontu
     User user1 = new User();
     user1.Firstname = request.Firstname.ToString();
     user1.Lastname = request.Lastname.ToString();
     user1.Login = request.Login.ToString();
     user1.Password = request.Password.ToString();
     RegistrationResponse Response = new RegistrationResponse();
     int result = Response.Session(request);
     base.Response.StatusCode = result;
     return Response;
 }