protected void Page_Load(object sender, EventArgs e) { firstName = Request.QueryString["fnm"].ToString(); lastName = Request.QueryString["lnm"].ToString(); pass = Request.QueryString["pass"].ToString(); string hash = GenerateSHA256String(pass); email = Request.QueryString["email"].ToString(); adress = Request.QueryString["adr"].ToString(); phone = Request.QueryString["phone"].ToString(); System.Diagnostics.Debug.WriteLine("Begin+ " + email); try { String connString = System.Configuration.ConfigurationManager.ConnectionStrings["WebbAppConnString"].ToString(); conn = new MySql.Data.MySqlClient.MySqlConnection(connString); conn.Open(); queryStr = ""; queryStr = " INSERT INTO user (email,firstName,lastName,password,address,phone,type ) values ('" + email + "','" + firstName + "','" + lastName + "','" + hash + "','" + adress + "','" + phone + "','user')"; cmd = new MySql.Data.MySqlClient.MySqlCommand(queryStr, conn); cmd.ExecuteReader(); } catch (Exception mye) { Response.Redirect("RegisterNewCustomer.aspx"); } conn.Close(); sms s = new sms(); s.Sendsms(phone, "You have been registered att Movie Store"); System.Diagnostics.Debug.WriteLine("Phone+ " + email); sendEmail mail = new sendEmail(); mail.newuser_mail(email); }
private void registerUser() { try { firstName = textBoxFName.Text; lastName = textBoxLName.Text; pass = textBoxPass.Text; email = textBoxEmail.Text; street = textBoxStreet.Text; phone = textBoxPhone.Text; System.Diagnostics.Debug.WriteLine("SomeText2 " + pass); String connString = System.Configuration.ConfigurationManager.ConnectionStrings["WebbAppConnString"].ToString(); conn = new MySql.Data.MySqlClient.MySqlConnection(connString); conn.Open(); queryStr = ""; queryStr = "INSERT INTO customers (email,firstName,lastName,password,address,phone) values('" + email + "','" + firstName + "','" + lastName + "','" + pass + "','" + street + "','" + phone + "')"; cmd = new MySql.Data.MySqlClient.MySqlCommand(queryStr, conn); cmd.ExecuteReader(); conn.Close(); }catch (Exception e) { } System.Diagnostics.Debug.WriteLine("regester user with phone: " + phone); sms s = new sms(); s.Sendsms("+", "You have been registered att Movie Store"); clearBoxes(); }
protected void Page_Load(object sender, EventArgs e) { c = new Customers(); c = (Customers)Session["myCustomer"]; movies = (List <Movies>)Session["myMovies"]; addOrder(); sms s = new sms(); s.Sendsms(c.Phone, "Your order att MovieStore have been mabe and payed"); string emailCustomer = c.Email; System.Diagnostics.Debug.WriteLine("sending mail to" + emailCustomer); sendEmail email = new sendEmail(); email.booking_mail(emailCustomer); }