亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 編程 > C# > 正文

C#實例代碼之抽獎升級版可以經表格數據導入數據庫,抽獎設置,補抽

2020-01-24 01:19:18
字體:
來源:轉載
供稿:網友

我寫代碼一直是這個風格,廢話不多,直接給大家貼代碼,現在還是老規矩,具體代碼如下所示:

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Drawing.Imaging;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using System.Data.SqlClient;using System.Collections;using System.IO;namespace Check_Ticket{public partial class Btn_UpLoadFile : Form{string conn = "server=WIN-OUDREHCH;database=Xtf;uid=sa;pwd=";string sql = "";int CurNum = ;//獎項人數int second = ;//防止二次被抽取Hashtable hashtable = new Hashtable();//存儲編號Hashtable hashtable = new Hashtable();//存儲獲獎名單Hashtable hashtable = new Hashtable();//避免二次抽獎Dictionary<int, string> dict = new Dictionary<int, string>();//詞典存儲所有參賽者Random rd = new Random();int time = ;Label[] label = new Label[];int index = ;//詞典key鍵值int total = ;//label個數int num = ;//獲獎總數string s = "";int End = ;//抽獎結束public Btn_UpLoadFile(){InitializeComponent();}private void Form_Load(object sender, EventArgs e){dataGridView.ForeColor = Color.Blue;menu.Visible = false;comboBox.SelectedIndex = ;this.timer.Interval = ;this.timer.Interval = ;this.timer.Enabled = true;this.WindowState = FormWindowState.Maximized;}private void getNumber(string s){SqlConnection myconn = new SqlConnection(conn);myconn.Open();sql = "select *from SumPrize";SqlDataAdapter da = new SqlDataAdapter(sql, myconn);DataSet ds = new DataSet();da.Fill(ds);switch (s){case "一等獎":second = ;CurNum = Convert.ToInt(ds.Tables[].Rows[]["PrizeNum"].ToString());break;case "二等獎":second = ;CurNum = Convert.ToInt(ds.Tables[].Rows[]["PrizeNum"].ToString());break;case "三等獎":second = ;CurNum = Convert.ToInt(ds.Tables[].Rows[]["PrizeNum"].ToString());break;case "四等獎":second = ;CurNum = Convert.ToInt(ds.Tables[].Rows[]["PrizeNum"].ToString());break;case "五等獎":second = ;CurNum = Convert.ToInt(ds.Tables[].Rows[]["PrizeNum"].ToString());break;case "六等獎":second = ;CurNum = Convert.ToInt(ds.Tables[].Rows[]["PrizeNum"].ToString());break;case "請選擇":CurNum = ;break;default:break;}}private void button_Click(object sender, EventArgs e){SqlConnection myconn = new SqlConnection(conn);myconn.Open();//未選擇抽獎項if (CurNum == ){MessageBox.Show("未設置該獎項或未選擇獎項,抽獎沒有意義?。?!");return;}//處理已經被抽獎項if (!hashtable.ContainsValue(second)){comboBox.Enabled = true;hashtable.Add(second, second);}else{MessageBox.Show("此獎項已經被抽過,換個獎項吧?");return;}string prize = comboBox.Text.ToString();string sqlCount = "Select sum(PrizeNum) as num from SumPrize";SqlDataAdapter sda = new SqlDataAdapter(sqlCount, myconn);DataSet ds = new DataSet();sda.Fill(ds);//設置有獎總人數num = Convert.ToInt(ds.Tables[].Rows[]["num"].ToString());for (int i = ; i < dataGridView.RowCount-; i++){dict.Add(index, dataGridView.Rows[i].Cells["WorkerID"].Value.ToString() + " " + dataGridView.Rows[i].Cells["Name"].Value.ToString());index++;}myconn.Close();timer.Start();clearLabel();bornLabel();timer.Enabled = true;comboBox.Enabled = false;}private void button_Click(object sender, EventArgs e){End = ;menu.Text = "";hashtable.Clear();clearLabel();button.Enabled = true;button.Enabled = true;button.Enabled = false;menu.Visible = false;btnAdd.Visible = false;tbNum.Visible = false;ge.Visible = false;addEnd.Visible = false;lab.Text = "中獎名單";dataGridView.Visible = false;string sqlChecked = "delete from Checked";sql = "select *from Ticket";SqlConnection myconn = new SqlConnection(conn);myconn.Open();SqlDataAdapter sda = new SqlDataAdapter(sql, myconn);DataSet ds = new DataSet();sda.Fill(ds, "Ticket");dataGridView.DataSource = ds;dataGridView.DataMember = "Ticket";SqlCommand mycomm = new SqlCommand(sqlChecked, myconn);mycomm.ExecuteNonQuery();myconn.Close();}private void button_Click(object sender, EventArgs e){menu.Visible = false;clearLabel();sql = "select WorkerIDAndName,Prize from Checked order by PrizeID";SqlConnection myconn = new SqlConnection(conn);myconn.Open();SqlDataAdapter sda = new SqlDataAdapter(sql, myconn);DataSet ds = new DataSet();sda.Fill(ds, "Checked");dataGridView.DataSource = ds;dataGridView.DataMember = "Checked";dataGridView.Visible = true;menu.Text += "恭喜:/n";for(int i=;i<dataGridView.RowCount-;i++){menu.Text += dataGridView.Rows[i].Cells["WorkerIDAndName"].Value.ToString() +" 獲得"+ dataGridView.Rows[i].Cells["Prize"].Value.ToString() + "/n";}menu.Visible = true;timer.Start();myconn.Close();}private void button_Click(object sender, EventArgs e){new SetPeople().ShowDialog();}private void comboBox_SelectedValueChanged(object sender, EventArgs e){getNumber(comboBox.Text.ToString());}private void timer_Tick(object sender, EventArgs e){lab.Left = lab.Left - ;if (lab.Right < ){lab.Left = this.Width;}}//創建labelsprivate void bornLabel(){int i = ;for (i = ; i < CurNum; i++){label[i] = new Label();label[i].ForeColor = Color.Blue;label[i].Location = new System.Drawing.Point(, + (i * ));label[i].Size = new System.Drawing.Size(, );label[i].BackColor = Color.Transparent;label[i].Anchor = (AnchorStyles.Top);label[i].Font = new System.Drawing.Font("SimSun", , FontStyle.Bold);this.Controls.Add(label[i]);}total = i;}//清除labelsprivate void clearLabel(){for (int i = ; i < total; i++){this.Controls.Remove(label[i]);}}private void timer_Tick(object sender, EventArgs e){hashtable.Clear();hashtable.Clear();SqlConnection con = new SqlConnection(conn);string sql = "select count(*) from Ticket";SqlCommand com = new SqlCommand(sql, con);con.Open();int emcount = Convert.ToInt(com.ExecuteScalar());con.Close();timer.Enabled = true;timer.Interval = time;int i;for (i = ; i < CurNum; i++){int random = Convert.ToInt(rd.Next(, emcount));if (dataGridView.Rows[random].Cells["Checked"].Value.ToString().Trim()=="" && !hashtable.ContainsValue(dict[random])){hashtable.Add(random,random);hashtable.Add(dict[random], dict[random]);label[i].Text = dict[random];}else{i--;}}}private void button_Click(object sender, EventArgs e){comboBox.Enabled = true;SqlConnection con = new SqlConnection(conn);con.Open();string sql = "";s = "";timer.Stop();foreach (DictionaryEntry de in hashtable){sql = string.Format("insert into Checked(WorkerIDAndName,Prize,PrizeID) values('{}','{}','{}')", de.Value.ToString(), comboBox.Text.ToString(),second.ToString());SqlCommand com = new SqlCommand(sql, con);com.ExecuteNonQuery(); s += de.Value.ToString() +" "; }foreach (DictionaryEntry de in hashtable){dataGridView.Rows[Convert.ToInt(de.Key)].Cells["Checked"].Value = "";}lab.Text = "恭喜: " + s + "獲得" + comboBox.Text.ToString();//判斷抽獎結束End = End + CurNum;if (End == num){button.Enabled = false;//button.Enabled = false;button.Enabled = true;if (MessageBox.Show("抽獎結束,是否進行補抽,點擊確定進行補抽,取消結束此次抽獎!", "溫馨提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes){btnAdd.Visible = true;tbNum.Visible = true;ge.Visible = true;addEnd.Visible = true;}}}private void timer_Tick(object sender, EventArgs e){menu.Top = menu.Top - ;if (menu.Bottom < ){menu.Top = this.Height-;}}private void 關閉窗口ToolStripMenuItem_Click(object sender, EventArgs e){this.Close();}private void btnAdd_Click(object sender, EventArgs e){CurNum = Convert.ToInt(tbNum.Text.ToString());if (CurNum == ){MessageBox.Show("請輸入補抽個數!!!", "溫馨提示");return;}End = End + CurNum;if (End > Convert.ToInt(dataGridView.RowCount)){button.Enabled = false;MessageBox.Show("抽獎超過參與人數無法進行補抽!","溫馨提示");return;}timer.Start();clearLabel();bornLabel();}private void addEnd_Click(object sender, EventArgs e){btnAdd.Visible = false;addEnd.Visible = false;tbNum.Visible = false;ge.Visible = false;menu.Visible = false;clearLabel();sql = "select WorkerIDAndName,Prize from Checked order by PrizeID";SqlConnection myconn = new SqlConnection(conn);myconn.Open();SqlDataAdapter sda = new SqlDataAdapter(sql, myconn);DataSet ds = new DataSet();sda.Fill(ds, "Checked");dataGridView.DataSource = ds;dataGridView.DataMember = "Checked";menu.Text += "恭喜:/n";for (int i = ; i < dataGridView.RowCount - ; i++){menu.Text += dataGridView.Rows[i].Cells["WorkerIDAndName"].Value.ToString() + " 獲得" + dataGridView.Rows[i].Cells["Prize"].Value.ToString() + "/n";}menu.Visible = true;timer.Start();myconn.Close();}//先導入到dataSetpublic DataSet getXSLData(string filepath){string strCon = "Provider=Microsoft.ACE.OLEDB..;Data Source=" + filepath + ";Extended Properties=/"Excel .;HDR=YES;/"";System.Data.OleDb.OleDbConnection Conn = new System.Data.OleDb.OleDbConnection(strCon);string strCom = "SELECT * FROM [Sheet$]";Conn.Open();System.Data.OleDb.OleDbDataAdapter myCommand = new System.Data.OleDb.OleDbDataAdapter(strCom, Conn);DataSet ds = new DataSet();myCommand.Fill(ds, "[Sheet$]");Conn.Close();return ds;}public static int errorcount = ;//記錄錯誤信息條數public static int insertcount = ;//記錄插入成功條數public static int updatecount = ;//記錄更新信息條數public bool ImportXSL(string home){try{DataSet ds = new DataSet();//取得數據集//調用上面的函數ds = getXSLData(@home);SqlConnection con = new SqlConnection(conn);con.Open();for (int i = ; i < ds.Tables[].Rows.Count; i++){string WorkerID = ds.Tables[].Rows[i][].ToString();string Name = ds.Tables[].Rows[i][].ToString();string Checked = ds.Tables[].Rows[i][].ToString();if (WorkerID != "" && Name != ""){string sq = string.Format("select * from Ticket where WorkerID='{}' and Name='{}'", WorkerID, Name);SqlCommand selectcom = new SqlCommand(sq, con);int count = Convert.ToInt(selectcom.ExecuteScalar());if (count > ){updatecount++;}else{string s = string.Format("insert into Ticket(WorkerID,Name,Checked) values('{}','{}','{}')", WorkerID, Name,Checked);SqlCommand insertcom = new SqlCommand(s, con);int result = insertcom.ExecuteNonQuery();insertcount++;}}}if (updatecount + insertcount == ds.Tables[].Rows.Count){return true;}else{return false;}}catch (Exception e){return false;}}//導入excleprivate void button_Click(object sender, EventArgs e){OpenFileDialog ofd = new OpenFileDialog();ofd.Filter = "Microsoft Excel files(*.xls)|*.xls;*.xlsx";//過濾一下,只要表格格式的ofd.RestoreDirectory = true;ofd.FilterIndex = ;ofd.AddExtension = true;ofd.CheckFileExists = true;ofd.CheckPathExists = true;ofd.ShowHelp = true;//是否顯示幫助按鈕if (ofd.ShowDialog() == DialogResult.OK){this.textBox.Text = ofd.FileName;} }//導入excle表格private void button_Click(object sender, EventArgs e){SqlConnection con = new SqlConnection(conn);con.Open();//清空主鍵信息,標識自增從開始string sqlstr = "truncate table Ticket";SqlCommand comm = new SqlCommand(sqlstr,con);comm.ExecuteNonQuery();con.Close();if (textBox.Text == ""){MessageBox.Show("請選擇一張表格?。?!", "溫馨提示");return;} if (ImportXSL(textBox.Text.ToString())){MessageBox.Show(insertcount + "條數據導入成功!" + updatecount + "條數據重復!");}textBox.Text = "";} namespace Check_Ticket{partial class Btn_UpLoadFile{/// <summary>/// 必需的設計器變量。/// </summary>private System.ComponentModel.IContainer components = null;/// <summary>/// 清理所有正在使用的資源。/// </summary>/// <param name="disposing">如果應釋放托管資源,為 true;否則為 false。</param>protected override void Dispose(bool disposing){if (disposing && (components != null)){components.Dispose();}base.Dispose(disposing);}#region Windows 窗體設計器生成的代碼/// <summary>/// 設計器支持所需的方法 - 不要/// 使用代碼編輯器修改此方法的內容。/// </summary>private void InitializeComponent(){this.components = new System.ComponentModel.Container();this.lab = new System.Windows.Forms.Label();this.comboBox = new System.Windows.Forms.ComboBox();this.button = new System.Windows.Forms.Button();this.dataGridView = new System.Windows.Forms.DataGridView();this.button = new System.Windows.Forms.Button();this.button = new System.Windows.Forms.Button();this.dataGridView = new System.Windows.Forms.DataGridView();this.button = new System.Windows.Forms.Button();this.lab = new System.Windows.Forms.Label();this.timer = new System.Windows.Forms.Timer(this.components);this.timer = new System.Windows.Forms.Timer(this.components);this.button = new System.Windows.Forms.Button();this.lab = new System.Windows.Forms.Label();this.timer = new System.Windows.Forms.Timer(this.components);this.menu = new System.Windows.Forms.Label();this.menuStrip = new System.Windows.Forms.MenuStrip();this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();this.附加功能ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();this.label = new System.Windows.Forms.Label();this.btnAdd = new System.Windows.Forms.Button();this.tbNum = new System.Windows.Forms.TextBox();this.ge = new System.Windows.Forms.Label();this.補抽ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();this.addEnd = new System.Windows.Forms.Button();this.openFileDialog = new System.Windows.Forms.OpenFileDialog();this.button = new System.Windows.Forms.Button();this.textBox = new System.Windows.Forms.TextBox();this.button = new System.Windows.Forms.Button();((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();this.menuStrip.SuspendLayout();this.SuspendLayout();// // lab// this.lab.AutoSize = true;this.lab.BackColor = System.Drawing.Color.Blue;this.lab.Font = new System.Drawing.Font("微軟雅黑", .F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)()));this.lab.ForeColor = System.Drawing.Color.Red;this.lab.Location = new System.Drawing.Point(, );this.lab.Name = "lab";this.lab.Size = new System.Drawing.Size(, );this.lab.TabIndex = ;this.lab.Text = "獎項名稱:";// // comboBox// this.comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;this.comboBox.ForeColor = System.Drawing.Color.Red;this.comboBox.FormattingEnabled = true;this.comboBox.Items.AddRange(new object[] {"請選擇","一等獎","二等獎","三等獎","四等獎","五等獎","六等獎"});this.comboBox.Location = new System.Drawing.Point(, );this.comboBox.Name = "comboBox";this.comboBox.Size = new System.Drawing.Size(, );this.comboBox.TabIndex = ;this.comboBox.SelectedValueChanged += new System.EventHandler(this.comboBox_SelectedValueChanged);// // button// this.button.Enabled = false;this.button.Font = new System.Drawing.Font("宋體", F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)()));this.button.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));this.button.Location = new System.Drawing.Point(, );this.button.Name = "button";this.button.Size = new System.Drawing.Size(, );this.button.TabIndex = ;this.button.Text = "開始抽獎";this.button.UseVisualStyleBackColor = true;this.button.Click += new System.EventHandler(this.button_Click);// // dataGridView// this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;this.dataGridView.Location = new System.Drawing.Point(, );this.dataGridView.Name = "dataGridView";this.dataGridView.RowTemplate.Height = ;this.dataGridView.Size = new System.Drawing.Size(, );this.dataGridView.TabIndex = ;this.dataGridView.Visible = false;// // button// this.button.Enabled = false;this.button.Font = new System.Drawing.Font("宋體", F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)()));this.button.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));this.button.Location = new System.Drawing.Point(, );this.button.Name = "button";this.button.Size = new System.Drawing.Size(, );this.button.TabIndex = ;this.button.Text = "查看獲獎名單";this.button.UseVisualStyleBackColor = true;this.button.Click += new System.EventHandler(this.button_Click);// // button// this.button.Font = new System.Drawing.Font("宋體", F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)()));this.button.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));this.button.Location = new System.Drawing.Point(, );this.button.Name = "button";this.button.Size = new System.Drawing.Size(, );this.button.TabIndex = ;this.button.Text = "人員加載";this.button.UseVisualStyleBackColor = true;this.button.Click += new System.EventHandler(this.button_Click);// // dataGridView// this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;this.dataGridView.GridColor = System.Drawing.Color.Black;this.dataGridView.Location = new System.Drawing.Point(, );this.dataGridView.Name = "dataGridView";this.dataGridView.RowHeadersVisible = false;this.dataGridView.RowTemplate.Height = ;this.dataGridView.Size = new System.Drawing.Size(, );this.dataGridView.TabIndex = ;this.dataGridView.Visible = false;// // button// this.button.Font = new System.Drawing.Font("宋體", F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)()));this.button.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));this.button.Location = new System.Drawing.Point(, );this.button.Name = "button";this.button.Size = new System.Drawing.Size(, );this.button.TabIndex = ;this.button.Text = "設置獎項對應人數";this.button.UseVisualStyleBackColor = true;this.button.Click += new System.EventHandler(this.button_Click);// // lab// this.lab.AutoSize = true;this.lab.BackColor = System.Drawing.Color.Transparent;this.lab.Font = new System.Drawing.Font("宋體", F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));this.lab.ForeColor = System.Drawing.Color.Blue;this.lab.Location = new System.Drawing.Point(, );this.lab.Name = "lab";this.lab.Size = new System.Drawing.Size(, );this.lab.TabIndex = ;this.lab.Text = "獲獎名單";// // timer// this.timer.Tick += new System.EventHandler(this.timer_Tick);// // timer// this.timer.Tick += new System.EventHandler(this.timer_Tick);// // button// this.button.Enabled = false;this.button.ForeColor = System.Drawing.Color.Red;this.button.Location = new System.Drawing.Point(, );this.button.Name = "button";this.button.Size = new System.Drawing.Size(, );this.button.TabIndex = ;this.button.Text = "停止抽獎";this.button.UseVisualStyleBackColor = true;this.button.Click += new System.EventHandler(this.button_Click);// // lab// this.lab.Anchor = System.Windows.Forms.AnchorStyles.Top;this.lab.AutoSize = true;this.lab.BackColor = System.Drawing.Color.Transparent;this.lab.Font = new System.Drawing.Font("華文新魏", F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)()));this.lab.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));this.lab.Location = new System.Drawing.Point(, );this.lab.Name = "lab";this.lab.Size = new System.Drawing.Size(, );this.lab.TabIndex = ;this.lab.Text = "善林商務年會抽獎活動";// // timer// this.timer.Tick += new System.EventHandler(this.timer_Tick);// // menu// this.menu.AutoSize = true;this.menu.BackColor = System.Drawing.Color.Transparent;this.menu.Font = new System.Drawing.Font("宋體", F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));this.menu.ForeColor = System.Drawing.Color.Blue;this.menu.Location = new System.Drawing.Point(, );this.menu.Name = "menu";this.menu.Size = new System.Drawing.Size(, );this.menu.TabIndex = ;// // menuStrip// this.menuStrip.BackColor = System.Drawing.Color.Transparent;this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {this.ToolStripMenuItem,this.附加功能ToolStripMenuItem});this.menuStrip.Location = new System.Drawing.Point(, );this.menuStrip.Name = "menuStrip";this.menuStrip.Size = new System.Drawing.Size(, );this.menuStrip.TabIndex = ;this.menuStrip.Text = "menuStrip";// // ToolStripMenuItem// this.ToolStripMenuItem.BackColor = System.Drawing.Color.Transparent;this.ToolStripMenuItem.ForeColor = System.Drawing.Color.Blue;this.ToolStripMenuItem.Name = "ToolStripMenuItem";this.ToolStripMenuItem.Size = new System.Drawing.Size(, );this.ToolStripMenuItem.Text = "關閉窗口";this.ToolStripMenuItem.Click += new System.EventHandler(this.關閉窗口ToolStripMenuItem_Click);// // 附加功能ToolStripMenuItem// this.附加功能ToolStripMenuItem.Name = "附加功能ToolStripMenuItem";this.附加功能ToolStripMenuItem.Size = new System.Drawing.Size(, );// // label// this.label.Anchor = System.Windows.Forms.AnchorStyles.Top;this.label.AutoSize = true;this.label.ForeColor = System.Drawing.Color.Yellow;this.label.Location = new System.Drawing.Point(, );this.label.Name = "label";this.label.Size = new System.Drawing.Size(, );this.label.TabIndex = ;this.label.Text = "---------------------------------------------------------------------------------" +"------";// // btnAdd// this.btnAdd.ForeColor = System.Drawing.Color.Indigo;this.btnAdd.Location = new System.Drawing.Point(, );this.btnAdd.Name = "btnAdd";this.btnAdd.Size = new System.Drawing.Size(, );this.btnAdd.TabIndex = ;this.btnAdd.Text = "補抽";this.btnAdd.UseVisualStyleBackColor = true;this.btnAdd.Visible = false;this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);// // tbNum// this.tbNum.Location = new System.Drawing.Point(, );this.tbNum.Name = "tbNum";this.tbNum.Size = new System.Drawing.Size(, );this.tbNum.TabIndex = ;this.tbNum.Text = "";this.tbNum.Visible = false;// // ge// this.ge.AutoSize = true;this.ge.Font = new System.Drawing.Font("宋體", .F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)()));this.ge.Location = new System.Drawing.Point(, );this.ge.Name = "ge";this.ge.Size = new System.Drawing.Size(, );this.ge.TabIndex = ;this.ge.Text = "個";this.ge.Visible = false;// // 補抽ToolStripMenuItem// this.補抽ToolStripMenuItem.Name = "補抽ToolStripMenuItem";this.補抽ToolStripMenuItem.Size = new System.Drawing.Size(, );// // addEnd// this.addEnd.Location = new System.Drawing.Point(, );this.addEnd.Name = "addEnd";this.addEnd.Size = new System.Drawing.Size(, );this.addEnd.TabIndex = ;this.addEnd.Text = "補抽結束";this.addEnd.UseVisualStyleBackColor = true;this.addEnd.Visible = false;this.addEnd.Click += new System.EventHandler(this.addEnd_Click);// // openFileDialog// this.openFileDialog.FileName = "openFileDialog";// // button// this.button.Location = new System.Drawing.Point(, );this.button.Name = "button";this.button.Size = new System.Drawing.Size(, );this.button.TabIndex = ;this.button.Text = "選擇文件";this.button.UseVisualStyleBackColor = true;this.button.Click += new System.EventHandler(this.button_Click);// // textBox// this.textBox.Location = new System.Drawing.Point(, );this.textBox.Name = "textBox";this.textBox.Size = new System.Drawing.Size(, );this.textBox.TabIndex = ;// // button// this.button.Location = new System.Drawing.Point(, );this.button.Name = "button";this.button.Size = new System.Drawing.Size(, );this.button.TabIndex = ;this.button.Text = "上傳文件";this.button.UseVisualStyleBackColor = true;this.button.Click += new System.EventHandler(this.button_Click);// // Btn_UpLoadFile// this.AutoScaleDimensions = new System.Drawing.SizeF(F, F);this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;this.BackColor = System.Drawing.Color.Red;this.ClientSize = new System.Drawing.Size(, );this.Controls.Add(this.button);this.Controls.Add(this.textBox);this.Controls.Add(this.button);this.Controls.Add(this.addEnd);this.Controls.Add(this.ge);this.Controls.Add(this.tbNum);this.Controls.Add(this.btnAdd);this.Controls.Add(this.label);this.Controls.Add(this.menu);this.Controls.Add(this.lab);this.Controls.Add(this.button);this.Controls.Add(this.lab);this.Controls.Add(this.button);this.Controls.Add(this.dataGridView);this.Controls.Add(this.button);this.Controls.Add(this.button);this.Controls.Add(this.comboBox);this.Controls.Add(this.dataGridView);this.Controls.Add(this.button);this.Controls.Add(this.lab);this.Controls.Add(this.menuStrip);this.DoubleBuffered = true;this.Font = new System.Drawing.Font("宋體", F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)()));this.ForeColor = System.Drawing.Color.Purple;this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;this.MainMenuStrip = this.menuStrip;this.MaximumSize = new System.Drawing.Size(, );this.MinimumSize = new System.Drawing.Size(, );this.Name = "Btn_UpLoadFile";this.ShowIcon = false;this.Text = "抽獎界面";this.Load += new System.EventHandler(this.Form_Load);((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();this.menuStrip.ResumeLayout(false);this.menuStrip.PerformLayout();this.ResumeLayout(false);this.PerformLayout();}#endregionprivate System.Windows.Forms.Label lab;private System.Windows.Forms.ComboBox comboBox;private System.Windows.Forms.Button button;private System.Windows.Forms.DataGridView dataGridView;private System.Windows.Forms.Button button;private System.Windows.Forms.Button button;private System.Windows.Forms.DataGridView dataGridView;private System.Windows.Forms.Button button;private System.Windows.Forms.Label lab;private System.Windows.Forms.Timer timer;private System.Windows.Forms.Timer timer;private System.Windows.Forms.Button button;private System.Windows.Forms.Label lab;private System.Windows.Forms.Timer timer;private System.Windows.Forms.Label menu;private System.Windows.Forms.MenuStrip menuStrip;private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;private System.Windows.Forms.Label label;private System.Windows.Forms.Button btnAdd;private System.Windows.Forms.TextBox tbNum;private System.Windows.Forms.Label ge;private System.Windows.Forms.ToolStripMenuItem 附加功能ToolStripMenuItem;private System.Windows.Forms.ToolStripMenuItem 補抽ToolStripMenuItem;private System.Windows.Forms.Button addEnd;private System.Windows.Forms.OpenFileDialog openFileDialog;private System.Windows.Forms.Button button;private System.Windows.Forms.TextBox textBox;private System.Windows.Forms.Button button;}} }}

數據庫設計


界面

好了,本文就給大家介紹這么多,有需要的朋友可以參考下本代碼,根據自己實際需求適當加入,同時感謝大家一直以來對武林網網站的支持。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
91精品免费看| 国语自产偷拍精品视频偷| 久久夜色精品国产亚洲aⅴ| 国产亚洲欧美一区| 国产精品日韩在线一区| 精品视频9999| 美女999久久久精品视频| 97视频免费看| 亚洲第一精品久久忘忧草社区| 亚洲视频免费一区| 美女福利精品视频| 国产精品久久久久7777婷婷| 日韩电影免费在线观看| 综合久久五月天| 亚洲乱码国产乱码精品精| 国产精品激情av电影在线观看| 在线观看欧美成人| 亚洲性猛交xxxxwww| 亚洲а∨天堂久久精品9966| 亚洲国语精品自产拍在线观看| 人妖精品videosex性欧美| 在线精品播放av| 国产亚洲精品日韩| 国产精品露脸av在线| 国产欧美日韩专区发布| 日韩高清av在线| 亚洲成人三级在线| 日韩电视剧在线观看免费网站| 8x海外华人永久免费日韩内陆视频| 成人国产精品久久久| 欧美在线视频免费| 亚洲成人精品视频在线观看| 中文字幕亚洲综合久久筱田步美| 久久av在线播放| 国产精品丝袜一区二区三区| 91精品国产沙发| 免费97视频在线精品国自产拍| 欧美资源在线观看| 在线观看精品国产视频| 亚洲图片制服诱惑| 久久免费少妇高潮久久精品99| 日韩亚洲国产中文字幕| 亚洲精品不卡在线| 欧美激情手机在线视频| 日韩一区二区三区在线播放| 亚洲欧美日韩高清| 一区二区在线视频播放| 亚洲国产女人aaa毛片在线| 成人久久18免费网站图片| 亚洲性生活视频| 黄色一区二区在线| 成人高清视频观看www| 日韩在线播放一区| 亚洲激情自拍图| 色妞欧美日韩在线| 一本色道久久88综合日韩精品| 日韩在线观看免费高清| 亚洲午夜精品久久久久久久久久久久| 国产精品高潮视频| 欧美激情区在线播放| 久久精品视频在线播放| 欧美一区二区三区……| 亚洲男人天堂网| 亚洲欧美一区二区激情| 久久久久国产一区二区三区| 国产亚洲精品美女久久久| 亚洲美女自拍视频| 最近2019好看的中文字幕免费| 色偷偷综合社区| 亚洲欧美综合精品久久成人| 麻豆国产va免费精品高清在线| 亚洲一区国产精品| 欧美野外猛男的大粗鳮| 成人黄色av网站| 国产亚洲精品久久久优势| 亚洲色图综合久久| 亚洲第一中文字幕在线观看| 国产精品视频免费观看www| 91成人在线播放| 69影院欧美专区视频| 中文字幕少妇一区二区三区| 欧美极品少妇xxxxⅹ裸体艺术| 国产成人小视频在线观看| 精品一区二区三区三区| 亚洲免费一级电影| 国产精品无码专区在线观看| 日韩亚洲国产中文字幕| 在线电影欧美日韩一区二区私密| 国产精品pans私拍| 亚洲自拍欧美色图| 国内精品久久久| 成人有码在线视频| 九九综合九九综合| 国产成人综合亚洲| 一区二区三欧美| 国产精品久久婷婷六月丁香| 久久久久久尹人网香蕉| 欧美性极品少妇精品网站| 久久精品99久久久香蕉| 亚洲第一av网站| 欧美日韩免费观看中文| 精品国产欧美一区二区三区成人| 亚洲aⅴ日韩av电影在线观看| 岛国精品视频在线播放| 日韩日本欧美亚洲| 91精品啪aⅴ在线观看国产| 亚洲人成在线观看网站高清| 精品久久久免费| 最近免费中文字幕视频2019| 久久久精品2019中文字幕神马| 久久国产精品影视| 亚洲激情免费观看| 国产综合香蕉五月婷在线| 国产精品美女久久久久av超清| 亚洲欧美日韩中文视频| 久久视频国产精品免费视频在线| 日韩av观看网址| 亚洲乱码av中文一区二区| 久久久久久69| 国模叶桐国产精品一区| 亚洲天堂av在线免费观看| 国产精品久久久久久久久久久久| 亚洲国产一区二区三区在线观看| 久久久久免费视频| 最近2019年日本中文免费字幕| 岛国av一区二区在线在线观看| 91国偷自产一区二区三区的观看方式| 色婷婷综合久久久久中文字幕1| 亚洲色无码播放| 一区二区三区www| 欧美精品久久久久久久久| 88xx成人精品| 中文日韩电影网站| 亚洲老板91色精品久久| 亚洲国产高清自拍| 国产精品网红福利| 久久精品久久久久久国产 免费| 成人黄色网免费| 一级做a爰片久久毛片美女图片| 亚洲精品大尺度| 亚洲欧美中文日韩在线v日本| 久久成人在线视频| 一区二区欧美日韩视频| 精品国产一区二区三区四区在线观看| 欧美xxxx18性欧美| 成人免费视频a| 亚洲成人久久电影| 一本久久综合亚洲鲁鲁| 欧美日韩中文在线观看| 日韩精品在线影院| 国产成人精品久久亚洲高清不卡| 久久国产精品99国产精| 亚洲免费中文字幕| 91久久久在线| 日本精品性网站在线观看| 亚洲国产婷婷香蕉久久久久久| 久久久久国色av免费观看性色| 亚洲国产成人91精品| 中文字幕综合在线| 国产精品美女久久久久av超清| 精品国产依人香蕉在线精品| 亚洲国产精久久久久久久| 成人在线观看视频网站| 欧美日韩国产丝袜另类|