Advertisement
Guest User

Untitled

a guest
Sep 18th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. public ActionResult Register(REGISTRATION registration)
  2. {
  3.  
  4. var email = registration.Email;
  5. var username = registration.UserName;
  6. var pass = registration.Password;
  7. var confirmpass = registration.ConfirmPassword;
  8. var mobile = registration.MobileNumber;
  9. byte image = Convert.ToByte(registration.Image);
  10. OracleConnection connection = new OracleConnection();
  11. connection.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["DBConnectionDHC"].ToString();
  12. connection.Open();
  13. OracleCommand command = connection.CreateCommand();
  14. string query = "INSERT INTO REGISTRATION (EMAIL,USERNAME,PASSWORD,CONFIRMPASSWORD,MOBILENUMBER,IMAGE) VALUES('" + email + "','" + username + "','" + pass + "','" + confirmpass + "','" + mobile + "','" + image + "')";
  15. command.CommandText = query;
  16.  
  17. if (MailExists(registration))
  18. {
  19. return View("MailExists");
  20. }
  21.  
  22. command.ExecuteNonQuery();
  23. return View("Congratulation");
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement