Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <connectionStrings>
- <add name="SicConnectionString" connectionString ="Data Source=ETID-012312\ETID012312;User=sa;Password=admin2312;Initial Catalog=Sic_db;Integrated Security=True;" providerName = "System.Data.SqlClient" />
- @{
- Layout = "~/_SiteLayout.cshtml";
- Page.Title = "Cadastro";
- var fantasia = "";
- var cnpj = "";
- var cep = "";
- var endereco = "";
- var estado = "";
- var cidade = "";
- var bairro = "";
- var celular = "";
- var telefone = "";
- var email = "";
- var usuario = "";
- var senha = "";
- var csenha = "";
- var error = false;
- var resultado = "";
- if (IsPost)
- {
- var db = Database.OpenConnectionString("Data Source=;User=;Password=;Initial Catalog=;Integrated Security=True;");
- fantasia = Request.Form["fantasia_txv"];
- cnpj = Request.Form["cnpj_txv"];
- cep = Request.Form["cep_txv"];
- endereco = Request.Form["endereco_txv"];
- estado = Request.Form["estado_txv"];
- cidade = Request.Form["cidade_txv"];
- bairro = Request.Form["bairro_txv"];
- celular = Request.Form["celular_txv"];
- telefone = Request.Form["telefone_txv"];
- email = Request.Form["email_txv"];
- usuario = Request.Form["usuario_txv"];
- senha = Request.Form["senha_txv"];
- csenha = Request.Form["csenha_txv"];
- // Define the insert query. The values to assign to the
- // columns in the Product table are defined as parameters
- // with the VALUES keyword.
- var insertQuery = "INSERT INTO dbo.TempAcc (TA_fantasia, TA_cnpj, TA_cep, TA_endereco, TA_estado, TA_cidade, TA_bairro, TA_celular, TA_telefone, TA_email, TA_usuario, TA_senha)" +
- "VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11)";
- db.Execute(insertQuery, fantasia, cnpj, cep, endereco, estado, cidade, bairro, celular, telefone, email, usuario, senha);
- // Display the page that lists products.
- }
Add Comment
Please, Sign In to add comment