早教吧作业答案频道 -->其他-->
英语翻译usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespaceWindowsFormsApplication2
题目详情
英语翻译
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace WindowsFormsApplication24
{
public partial class Form2 :Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender,EventArgs e)
{
}
private void button1_Click(object sender,EventArgs e)
{
this.Close();
}
private void button2_Click(object sender,EventArgs e)
{
SqlConnection conn = new SqlConnection(@"Data Source=.\SQLEXPRESS;
AttachDBFilename=|DataDirectory|Database1.mdf;Integrated Security=True;User Instance=True");
conn.Open();
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "insert into Table1(Name,Password) values(@name,@pwd)";
cmd.CommandText = "select*from Table1 where Name=@aa";
cmd.Parameters.AddWithValue("aa",textBox1.Text);
SqlDataReader reader = cmd.ExecuteReader();
if (reader.Read())
{
return;
}
if (textBox1.Text == "")
{
MessageBox.Show( "请输入用户名");
return;
}
if (textBox2.Text == "")
{
MessageBox.Show("请输入密码");
return;
}
cmd.Dispose();
conn.Dispose();
SqlConnection conn1 = new SqlConnection(@"Data Source=.\SQLEXPRESS;
AttachDBFilename=|DataDirectory|Database1.mdf;Integrated Security=True;User Instance=True");
conn1.Open();
SqlCommand cmd1 = conn1.CreateCommand();
cmd1.CommandText = "insert into Table1(Name,Password) values(@name,@pwd)";
cmd1.Parameters.AddWithValue("name",textBox1.Text);
cmd1.Parameters.AddWithValue("pwd",textBox2.Text);
cmd1.ExecuteNonQuery();
MessageBox.Show("注册成功!");
textBox1.Text = "";
textBox2.Text = "";
cmd.Dispose();
conn1.Dispose();
}
private void textBox2_TextChanged(object sender,EventArgs e)
{
}
private void textBox1_TextChanged(object sender,EventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace WindowsFormsApplication24
{
public partial class Form2 :Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender,EventArgs e)
{
}
private void button1_Click(object sender,EventArgs e)
{
this.Close();
}
private void button2_Click(object sender,EventArgs e)
{
SqlConnection conn = new SqlConnection(@"Data Source=.\SQLEXPRESS;
AttachDBFilename=|DataDirectory|Database1.mdf;Integrated Security=True;User Instance=True");
conn.Open();
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "insert into Table1(Name,Password) values(@name,@pwd)";
cmd.CommandText = "select*from Table1 where Name=@aa";
cmd.Parameters.AddWithValue("aa",textBox1.Text);
SqlDataReader reader = cmd.ExecuteReader();
if (reader.Read())
{
return;
}
if (textBox1.Text == "")
{
MessageBox.Show( "请输入用户名");
return;
}
if (textBox2.Text == "")
{
MessageBox.Show("请输入密码");
return;
}
cmd.Dispose();
conn.Dispose();
SqlConnection conn1 = new SqlConnection(@"Data Source=.\SQLEXPRESS;
AttachDBFilename=|DataDirectory|Database1.mdf;Integrated Security=True;User Instance=True");
conn1.Open();
SqlCommand cmd1 = conn1.CreateCommand();
cmd1.CommandText = "insert into Table1(Name,Password) values(@name,@pwd)";
cmd1.Parameters.AddWithValue("name",textBox1.Text);
cmd1.Parameters.AddWithValue("pwd",textBox2.Text);
cmd1.ExecuteNonQuery();
MessageBox.Show("注册成功!");
textBox1.Text = "";
textBox2.Text = "";
cmd.Dispose();
conn1.Dispose();
}
private void textBox2_TextChanged(object sender,EventArgs e)
{
}
private void textBox1_TextChanged(object sender,EventArgs e)
{
}
}
}
▼优质解答
答案和解析
就是个连接数据库的登陆/注册的窗体,这些你随便在网上一搜就一堆
看了 英语翻译usingSyste...的网友还看了以下:
英语翻译t=0:.001:.25;x=sin(2*pi*50*t)+sin(2*pi*120*t) 2020-05-12 …
Matlab程序:错误在哪里建立函数文件fun5.mfunction dy=fun5(t,y)dy 2020-05-16 …
设A是n阶矩阵,A=E+xy^T,x与y都是n*1矩阵,且x^T*y=2,求A的特征值、特征向量易 2020-06-30 …
含有字母t,y,x,q,d的单词含有t,y,x,q,d或t,y,l,w,d的单词(词组也行,单词最 2020-07-16 …
已知:dx(t)/dt=y(t)x(t),初始条件为x(0)=0,y(t)不恒等于0.x(t)必定 2020-07-23 …
设S、T是两个非空集合,且T真包含于S,S真包含于T,令X={x|x∈T且x不属于S},Y={y| 2020-08-01 …
x=t+1/t,y=t-1/t化成普通方程x=t+1/t,y=t-1/t(t为参数),化成x=t+ 2020-08-02 …
若x/(y+z+t)=y/(z+t+x)=z/(t+x+y)=t/(x+y+z)即f=(x+y)/( 2020-10-30 …
x=f1(s,t)y=f2(s,t)z=f3(s,t)用matlab计算出F(x,y,z)=0x=f 2020-11-01 …
用mathmetica求解常微分方程组的问题!急急急r=1,d=0.5,a=0.1,b=0.02,x 2021-01-04 …