• 大小: 1.01M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-02
  • 语言: 其他
  • 标签: 其他  

资源简介

C双色球彩票模拟抽奖、随机生成号码系统.rar

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
//Download by http://www.codefans.net
namespace caipiao
{
    public partial class AddNew : Form
    {
        public AddNew()
        {
            InitializeComponent();
        }
        SqlConnection conn = new SqlConnection(“ Data Source=.;Initial Catalog=caipiao;Integrated Security=True“);
        private void button1_Click(object sender EventArgs e)
        {
           this.dateTimePicker1.Format = DateTimePickerFormat.Custom;
           dateTimePicker1.CustomFormat = “yyyy年M月d日“;
            conn.Open();
            string sql = “insert into caipiaoku(cpidcprqonetwothreefourfivesixblue)values(‘“ + this.textBox8.Text + “‘‘“ + this.dateTimePicker1.Value + “‘‘“ + this.textBox1.Text + “‘‘“ + this.textBox2.Text + “‘‘“ + this.textBox3.Text + “‘‘“ + this.textBox4.Text + “‘‘“ + this.textBox5.Text + “‘‘“ + this.textBox6.Text + “‘‘“ + this.textBox7.Text + “‘)“;
            SqlCommand scd = new SqlCommand(sql conn);
            scd.ExecuteNonQuery();
            conn.Close();
            MessageBox.Show(“插入成功!“);
            this.textBox1.Text = ““;
            this.textBox2.Text = ““;
            this.textBox3.Text = ““;
            this.textBox4.Text = ““;
            this.textBox5.Text = ““;
            this.textBox6.Text = ““;
            this.textBox7.Text = ““;
            this.textBox8.Text = ““;
            
           
        }

        private void button3_Click(object sender EventArgs e)
        {
            this.textBox1.Text = ““;
            this.textBox2.Text = ““;
            this.textBox3.Text = ““;
            this.textBox4.Text = ““;
            this.textBox5.Text = ““;
            this.textBox6.Text = ““;
            this.textBox7.Text = ““;
            this.textBox8.Text = ““;
            
        }

        private void button4_Click(object sender EventArgs e)
        {
            this.Close();
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

----------- ---------  ---------- -----  ----

              5453575                    59


评论

共有 条评论