当前位置: 首页 > news >正文

福州网站建设 网络服务企业债纳入公司债规则出炉

福州网站建设 网络服务,企业债纳入公司债规则出炉,友情链接属于免费推广吗,枣庄住房和城市建设局网站一、页面设计 一共四个页面 主页面Form1#xff0c;登录页面login#xff0c;注册页面resister#xff0c;主菜单页面main_page 系统运行进入Form1#xff0c;单击登录按钮跳转到login#xff0c;数据库中得存在数据信息且输入正确才可登录成功#xff0c;跳转到main_pa…一、页面设计 一共四个页面 主页面Form1登录页面login注册页面resister主菜单页面main_page 系统运行进入Form1单击登录按钮跳转到login数据库中得存在数据信息且输入正确才可登录成功跳转到main_page 单击注册按钮跳转到register用户需要注册账号、密码、性别、手机号信息 Form1 login register main_page 四个页面如下 二、数据库的创建 创建fiber_yy数据库在其下创建yy_user表其中id为主键自增 整体结构如下 三、相关代码 Form1代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.Sql; using System.Data.SqlClient;namespace fiber_yy {public partial class Form1 : Form{public Form1(){InitializeComponent();}private void label2_Click(object sender, EventArgs e){}private void button1_Click(object sender, EventArgs e){this.Hide();new login().Show();}private void button3_Click(object sender, EventArgs e){MessageBox.Show(see you again~);Application.Exit(); //退出进程}private void button2_Click(object sender, EventArgs e){this.Hide();new register().Show();}} } login代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.OleDb; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.Sql; using System.Data.SqlClient;namespace fiber_yy {public partial class login : Form{public static string str_conn serverCY-20190824RMES;Initial Catalogfiber_yy;User IDsa;pwdbeyond;SqlConnection conn new SqlConnection(str_conn);public string identification null;public login(){InitializeComponent();conn.Open();}private void button1_Click(object sender, EventArgs e)//登录{string username textBox1.Text;string password textBox2.Text;string identify textBox3.Text;if (username.Equals() || password.Equals() || identify.Equals()){MessageBox.Show(提示请输入用户名、密码、验证码, 警告);}else{string sqlSel select count(*) from yy_user where username username and password password ;SqlCommand cmd new SqlCommand(sqlSel, conn);if (Convert.ToInt32(cmd.ExecuteScalar()) 0 ){if(identifyidentification){this.Close();MessageBox.Show(用户登录成功);new main_page().Show();}else {MessageBox.Show(验证码输入错误);}}else{MessageBox.Show(账号或密码错误);}}}private void pictureBox1_Click(object sender, EventArgs e){Random r new Random();string str null;for (int i 0; i 5; i){int n r.Next(0, 10);str n;//包括字符串在内}identification str;Bitmap b new Bitmap(100, 15);Graphics g Graphics.FromImage(b);for (int i 0; i 5; i){String[] fonts { 宋体, 黑体, 隶书, 仿宋, 微软雅黑 };//字体数组Color[] colors { Color.Red, Color.Black, Color.Blue,Color.YellowGreen ,Color.Green };//颜色数组Font f new Font(fonts[r.Next(0, 5)], 25, FontStyle.Bold);SolidBrush s new SolidBrush(colors[r.Next(0, 5)]);//定义一个单独的画笔使每个字符的颜色随机Point p new Point(i * 20, 0);//每个字符间隔20g.DrawString(str[i].ToString(), Font, s, p);}for (int a 0; a 5; a){Point p1 new Point(r.Next(0, b.Width), r.Next(0, b.Height));Point p2 new Point(r.Next(0, b.Width), r.Next(0, b.Height));//线的两点不能超过图片的长和宽Pen pen new Pen(Brushes.Cyan);//青色线段g.DrawLine(pen, p1, p2);}pictureBox1.Image b;}} } register代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.OleDb; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.Sql; using System.Data.SqlClient;namespace fiber_yy {public partial class register : Form{public static string str_conn serverCY-20190824RMES;Initial Catalogfiber_yy;User IDsa;pwdbeyond;SqlConnection conn new SqlConnection(str_conn);public register(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){string sexman;long phone_number;int account_number, password, sum0;account_number textBox1.Text.Length;password textBox2.Text.Length;phone_number long.Parse(textBox3.Text);if (account_number 3 || account_number 16){label6.Text 账号长度应该在3~16字符之间;sum;}else{label6.Text 校验成功;}if (password 3 || password 16){label7.Text 密码长度应该在3~16字符之间;sum;}else{label7.Text 校验成功;}if (radioButton1.Checked){sex man;}else if (radioButton2.Checked){sex woman;}if (phone_number 10000000000 || phone_number 99999999999){label9.Text 请输入正确的手机号;sum;}else{label9.Text 校验成功;}if (sum 0){label6.Text √;label7.Text √;label8.Text √;label9.Text √;try{string sql string.Format(select count(*) from yy_user where username{0}, textBox1.Text);SqlCommand cmd new SqlCommand(sql, conn);conn.Open();int a (int)cmd.ExecuteScalar();//返回一个值看用户是否存在 1存在 0不存在StringBuilder strsql new StringBuilder();//MessageBox.Show(a.ToString());if(a1){MessageBox.Show(用户名已存在);}else{MessageBox.Show(okk);//string INSERT_sql string.Format(INSERT INTO user_yy VALUES ({0},{1}), textBox1.Text,textBox2.Text);string INSERT_sql string.Format(INSERT INTO yy_user VALUES ({0},{1},{2},{3}), textBox1.Text.Trim(), textBox2.Text.Trim(), sex, textBox3.Text.Trim());SqlCommand INSERT_cmd new SqlCommand(INSERT_sql, conn);int count INSERT_cmd.ExecuteNonQuery();if (count 0){MessageBox.Show(注册成功);this.Close();new Form1().Show();}else {MessageBox.Show(GG);}}}catch(Exception ex){MessageBox.Show(ex.Message);}}}private void button2_Click(object sender, EventArgs e){this.Close();MessageBox.Show(用户登录成功);new main_page().Show();}} }main_page代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;namespace fiber_yy {public partial class main_page : Form{public main_page(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){MessageBox.Show(退出成功);this.Close();new Form1().Show();}} } 四、效果展示 原始数据集数据信息 运行程序 注册 右击 yy_user— 选择前1000行 已经注册成功了接下来开始登录 随便输入一个账号 输入正确的账号但验证码输入错误 账号密码验证码输入正确 跳转到main_page 退出登录之后会返回到Form1 退出系统提示see you again~
http://www.yutouwan.com/news/270409/

相关文章:

  • 腾讯官方网站建设石河子做网站公司
  • 耳机商城网站开发51社社播放器
  • 网站设计总结与心得体会网站制作流程分为哪七步
  • 做建材加盟什么网站好商贸公司网站建设
  • 做网站需要用什么软件17网一起做网店广州站
  • 企业网站推广方法实验报告企业官网制作费用
  • 金乡县住房与城乡建设局网站网站建设实训总结报告
  • 网站源码推荐wordpress简洁cms主题
  • 做网站的请示米拓建站官网怎么用不了
  • 麒麟网站建设网页制作素材模板图片
  • 长春建立一个网站需要多少钱?wordpress推送公众号
  • 网站适合用angular做吗地方门户网站策划书
  • 快注销网站php做网站很快嘛
  • 做网站的公司有前途吗看电视剧的免费网站app下载
  • jsp网站开发公司我的世界做壁纸的网站
  • 空间网站认证wordpress媒体库远程上传
  • 济宁网站建设制作设计开发商虚假宣传是否构成欺诈
  • 英文版网站建站要求长沙h5建站
  • 做暧动漫视频在线观看网站做网站的app有什么作用
  • 皮革材料做网站做卫浴软管的网站
  • 自己怎么做淘宝客网站吗做类似于58同城的网站
  • 哪里需要人做钓鱼网站网站技术报务费如何做会计分录
  • 闸北区网站建设网页设计济南广告公司
  • 南京制作网站优化wordpress 最受欢迎文章
  • 如何在网站做404页面去视频网站做编辑器
  • 网站建设中的服务器搭建方式建筑网格布
  • 网站开发技术人员怎样设置网站关键词
  • 网站加载进度条作风建设年 网站
  • htm5网站ai效果图网站
  • 深圳微信网站设计东莞网站建设流程图