个人理财系统.docxVIP

  • 3
  • 0
  • 约3.7万字
  • 约 23页
  • 2020-09-08 发布于江苏
  • 举报
private void btlogin_Click( object sender, password = dataGridView1.Rows[0].Cells[1]. EventArgs e) Value.ToString().Trim(); { string username = null ; if (tbusername.Text.Equals(username) string password = null ; tbmima.Text.Equals(password)) if (tbusername.Text == ) { Form2 f2 = new Form2(); { MessageBox.Show( 你没有输入用户名! , 错 f2.Visible = true ; 误提示 ); return ; this .Visible = false ; } } if (tbmima.Text == ) else { MessageBox.Show( 你没有输入密码! , 错误 { MessageBox.Show( 你输入的用户名或密码错误 提示 ); , 错误提示 ); return ; tbusername.Clear(); } tbmima.Clear(); DataSet dst = new DataSet (); } string connstr = Data Source=(local);Initial con.Close(); Catalog=Message;Integrated Security=True ; } SqlConnection con = new private void btcancel_Click( object sender, SqlConnection (connstr); EventArgs e) con.Open(); { if ( MessageBox.Show( 你是否真的想退出系统? string str = select * from 登录 ; , 提示 , MessageBoxButtons .YesNo) != SqlDataAdapter sda = new SqlDataAdapter (str, DialogResult .No) con); { this .Close(); } SqlCommandBuilder scd = new SqlCommand } Builder (sda); private void button1_Click( object sender, sda.Fill(dst, tong ); EventArgs e) dataGridView1.DataSource = dst.Tables { string username = null ; [ tong ].DefaultView; string password = null ; username = dataGridView1.Rows[0].Cells[0]. if (tbusername.Text == ) Value.ToString().Trim(); { MessageBox.Show( 你没有输入用户名! , 错 误提示 ); return ; Value.ToString().Trim(); } password = dataGridView1.Rows[0].Cells[1]. if (tbmima.Text == ) Value.ToString().Trim(); { MessageBox.Show( 你没有输入密码! , 错误 if (tbusername.Text.Equals(username) 提示 ); return ; tbmima.Text.Equals(password)) } { if ( MessageBox.Show( 你确定要修改密码吗? DataSet dst = new DataSet (); , 提示 , MessageBoxButtons .YesNo) == string connstr = Data Source=(local);Initial DialogResult .Yes) Catalog=Message;Integrated Security=True ; { 修改密码 mima = new 修改密码 (); SqlConnection con = new SqlConnection mima.Visible = true ; (connstr); } con.Open(); } string str = select * from 登录 ; else Sql

文档评论(0)

1亿VIP精品文档

相关文档