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

首頁 > 學院 > 開發設計 > 正文

抽獎升級版可以經表格數據導入數據庫,抽獎設置,補抽

2019-11-14 13:35:12
字體:
來源:轉載
供稿:網友
  1 using System;  2 using System.Collections.Generic;  3 using System.ComponentModel;  4 using System.Data;  5 using System.Drawing;  6 using System.Drawing.Imaging;  7 using System.Linq;  8 using System.Text;  9 using System.Threading.Tasks; 10 using System.Windows.Forms; 11 using System.Data.SqlClient; 12 using System.Collections; 13 using System.IO; 14  15 namespace Check_Ticket 16 { 17     public partial class Btn_UpLoadFile : Form 18     { 19         string conn = "server=WIN-OUD59R7EHCH;database=Xtf;uid=sa;pwd=123456"; 20         string sql = ""; 21         int CurNum = 0;//獎項人數 22         int second = 0;//防止二次被抽取 23         Hashtable hashtable2 = new Hashtable();//存儲編號 24         Hashtable hashtable1 = new Hashtable();//存儲獲獎名單 25         Hashtable hashtable = new Hashtable();//避免二次抽獎 26         Dictionary<int, string> dict = new Dictionary<int, string>();//詞典存儲所有參賽者 27         Random rd = new Random(); 28         int time = 1; 29         Label[] label = new Label[100]; 30         int index = 0;//詞典key鍵值 31         int total = 0;//label個數 32         int num = 0;//獲獎總數 33         string s = ""; 34         int End = 0;//抽獎結束 35         public Btn_UpLoadFile() 36         { 37             InitializeComponent(); 38         } 39         PRivate void Form1_Load(object sender, EventArgs e) 40         { 41             dataGridView2.ForeColor = Color.Blue; 42             menu.Visible = false; 43             comboBox1.SelectedIndex = 0; 44             this.timer1.Interval = 10; 45             this.timer3.Interval = 100; 46             this.timer1.Enabled = true; 47             this.WindowState = FormWindowState.Maximized; 48         } 49         private void getNumber(string s) 50         { 51             SqlConnection myconn = new SqlConnection(conn); 52             myconn.Open(); 53             sql = "select *from SumPrize"; 54             SqlDataAdapter da = new SqlDataAdapter(sql, myconn); 55             DataSet ds = new DataSet(); 56             da.Fill(ds); 57             switch (s) 58             { 59                 case "一等獎": 60                     second = 1; 61                     CurNum = Convert.ToInt32(ds.Tables[0].Rows[0]["PrizeNum"].ToString()); 62                     break; 63                 case "二等獎": 64                     second = 2; 65                     CurNum = Convert.ToInt32(ds.Tables[0].Rows[1]["PrizeNum"].ToString()); 66                     break; 67                 case "三等獎": 68                     second = 3; 69                     CurNum = Convert.ToInt32(ds.Tables[0].Rows[2]["PrizeNum"].ToString()); 70                     break; 71                 case "四等獎": 72                     second = 4; 73                     CurNum = Convert.ToInt32(ds.Tables[0].Rows[3]["PrizeNum"].ToString()); 74                     break; 75                 case "五等獎": 76                     second = 5; 77                     CurNum = Convert.ToInt32(ds.Tables[0].Rows[4]["PrizeNum"].ToString()); 78                     break; 79                 case "六等獎": 80                     second = 6; 81                     CurNum = Convert.ToInt32(ds.Tables[0].Rows[5]["PrizeNum"].ToString()); 82                     break; 83                 case "請選擇": 84                     CurNum = 0; 85                     break; 86                 default: 87                     break; 88             } 89         } 90         private void button1_Click(object sender, EventArgs e) 91         { 92             SqlConnection myconn = new SqlConnection(conn); 93             myconn.Open(); 94             //未選擇抽獎項 95             if (CurNum == 0) 96             { 97                 MessageBox.Show("未設置該獎項或未選擇獎項,抽獎沒有意義?。?!"); 98                 return; 99             }100             //處理已經被抽獎項101 102             if (!hashtable1.ContainsValue(second))103             {104                 comboBox1.Enabled = true;105                 hashtable1.Add(second, second);106             }107             else108             {109                 MessageBox.Show("此獎項已經被抽過,換個獎項吧?");110                 return;111             }112             string prize = comboBox1.Text.ToString();113             string sqlCount = "Select sum(PrizeNum) as num from SumPrize";114             SqlDataAdapter sda = new SqlDataAdapter(sqlCount, myconn);115             DataSet ds = new DataSet();116             sda.Fill(ds);117             //設置有獎總人數118             num = Convert.ToInt32(ds.Tables[0].Rows[0]["num"].ToString());119             for (int i = 0; i < dataGridView1.RowCount-1; i++)120             {121                 dict.Add(index, dataGridView1.Rows[i].Cells["WorkerID"].Value.ToString() + " " + dataGridView1.Rows[i].Cells["Name"].Value.ToString());122                 index++;123             }124            125             myconn.Close();126             timer2.Start();127             clearLabel();128             bornLabel();129             timer1.Enabled = true;130             comboBox1.Enabled = false;131         }132 133         private void button3_Click(object sender, EventArgs e)134         {135             End = 0;136             menu.Text = "";137             hashtable1.Clear();138             clearLabel();139             button1.Enabled = true;140             button5.Enabled = true;141             button2.Enabled = false;142             menu.Visible = false;143             btnAdd.Visible = false;144             tbNum.Visible = false;145             ge.Visible = false;146             addEnd.Visible = false;147             lab1.Text = "中獎名單";148             dataGridView2.Visible = false;149             string sqlChecked = "delete from Checked";150             sql = "select *from Ticket";151             SqlConnection myconn = new SqlConnection(conn);152             myconn.Open();153             SqlDataAdapter sda = new SqlDataAdapter(sql, myconn);154             DataSet ds = new DataSet();155             sda.Fill(ds, "Ticket");156             dataGridView1.DataSource = ds;157             dataGridView1.DataMember = "Ticket";158             SqlCommand mycomm = new SqlCommand(sqlChecked, myconn);159             mycomm.ExecuteNonQuery();160             myconn.Close();161         }162 163         private void button2_Click(object sender, EventArgs e)164         {165             menu.Visible = false;166             clearLabel();167             sql = "select WorkerIDAndName,Prize from Checked order by PrizeID";168             SqlConnection myconn = new SqlConnection(conn);169             myconn.Open();170             SqlDataAdapter sda = new SqlDataAdapter(sql, myconn);171             DataSet ds1 = new DataSet();172             sda.Fill(ds1, "Checked");173             dataGridView2.DataSource = ds1;174             dataGridView2.DataMember = "Checked";175             dataGridView2.Visible = true;176             menu.Text += "恭喜:/n";177             for(int i=0;i<dataGridView2.RowCount-1;i++)178             {179                 menu.Text += dataGridView2.Rows[i].Cells["WorkerIDAndName"].Value.ToString() +"  獲得"+ dataGridView2.Rows[i].Cells["Prize"].Value.ToString() + "/n";180             }181             menu.Visible = true;182             timer3.Start();183             myconn.Close();184         }185 186         private void button4_Click(object sender, EventArgs e)187         {188             new SetPeople().ShowDialog();189         }190 191         private void comboBox1_SelectedValueChanged(object sender, EventArgs e)192         {193             getNumber(comboBox1.Text.ToString());194         }195 196         private void timer1_Tick(object sender, EventArgs e)197         {198             lab1.Left = lab1.Left - 6;199             if (lab1.Right < 0)200             {201                 lab1.Left = this.Width;202             }203         }204         //創建labels205         private void bornLabel()206         {207             int i = 0;208             for (i = 0; i < CurNum; i++)209             {210                 label[i] = new Label();211                 label[i].ForeColor = Color.Blue;212                 label[i].Location = new System.Drawing.Point(350, 170 + (i * 50));213                 label[i].Size = new System.Drawing.Size(320, 40);214                 label[i].BackColor = Color.Transparent;215                 label[i].Anchor = (AnchorStyles.Top);216                 label[i].Font = new System.Drawing.Font("SimSun", 20, FontStyle.Bold);217                 this.Controls.Add(label[i]);218             }219             total = i;220         }221         //清除labels222         private void clearLabel()223         {224             for (int i = 0; i < total; i++)225             {226                 this.Controls.Remove(label[i]);227             }228         }229         private void timer2_Tick(object sender, EventArgs e)230         {231             hashtable.Clear();232             hashtable2.Clear();233             SqlConnection con = new SqlConnection(conn);234             string sql = "select count(*) from Ticket";235             SqlCommand com = new SqlCommand(sql, con);236             con.Open();237             int emcount = Convert.ToInt32(com.ExecuteScalar());238             con.Close();239 240             timer2.Enabled = true;241 242             timer2.Interval = time;243             int i;244             for (i = 0; i < CurNum; i++)245             {246                 int random = Convert.ToInt32(rd.Next(0, emcount));247                 if (dataGridView1.Rows[random].Cells["Checked"].Value.ToString().Trim()=="1" 248                     && !hashtable.ContainsValue(dict[random]))249                 {250                     hashtable2.Add(random,random);251                     hashtable.Add(dict[random], dict[random]);252                     label[i].Text = dict[random];253                 }254                 else255                 {256                     i--;257                 }258 259             }260         }261 262         private void button5_Click(object sender, EventArgs e)263         {264             comboBox1.Enabled = true;265             SqlConnection con = new SqlConnection(conn);266             con.Open();267             string sql = "";268             s = "";269             timer2.Stop();270             foreach (DictionaryEntry de in hashtable)271             {272                 sql = string.Format("insert into Checked(WorkerIDAndName,Prize,PrizeID) values('{0}','{1}','{2}')", de.Value.ToString(), comboBox1.Text.ToString(),second.ToString());273                 SqlCommand com = new SqlCommand(sql, con);274                 com.ExecuteNonQuery(); 275                 s += de.Value.ToString() +"   "; 276             }277             foreach (DictionaryEntry de in hashtable2)278             {279                 dataGridView1.Rows[Convert.ToInt32(de.Key)].Cells["Checked"].Value = "0";280             }281             lab1.Text = "恭喜: " + s + "獲得" + comboBox1.Text.ToString();282             //判斷抽獎結束283             End = End + CurNum;284             if (End == num)285             {286                 button1.Enabled = false;287                 //button5.Enabled = false;288                 button2.Enabled = true;289                 if (MessageBox.Show("抽獎結束,是否進行補抽,點擊確定進行補抽,取消結束此次抽獎!", "溫馨提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)290                 {291                     btnAdd.Visible = true;292                     tbNum.Visible = true;293                     ge.Visible = true;294                     addEnd.Visible = true;295                 }296             }297             298         }299 300         private void timer3_Tick(object sender, EventArgs e)301         {302             menu.Top = menu.Top - 6 ;303             if (menu.Bottom < 0)304             {305                 menu.Top = this.Height-600;306             }307         }308 309         private void 關閉窗口ToolStripMenuItem_Click(object sender, EventArgs e)310         {311             this.Close();312         }313 314         private void btnAdd_Click(object sender, EventArgs e)315         {316             CurNum = Convert.ToInt32(tbNum.Text.ToString());317             if (CurNum == 0)318             {319                 MessageBox.Show("請輸入補抽個數!!!", "溫馨提示");320                 return;321             }322             End = End + CurNum;323             if (End > Convert.ToInt32(dataGridView1.RowCount))324             {325                 button5.Enabled = false;326                 MessageBox.Show("抽獎超過參與人數無法進行補抽!","溫馨提示");327                 return;328             }329             timer2.Start();330             clearLabel();331             bornLabel();332         }333 334         private void addEnd_Click(object sender, EventArgs e)335         {336             btnAdd.Visible = false;337             addEnd.Visible = false;338             tbNum.Visible = false;339             ge.Visible = false;340             menu.Visible = false;341             clearLabel();342             sql = "select WorkerIDAndName,Prize from Checked order by PrizeID";343             SqlConnection myconn = new SqlConnection(conn);344             myconn.Open();345             SqlDataAdapter sda = new SqlDataAdapter(sql, myconn);346             DataSet ds1 = new DataSet();347             sda.Fill(ds1, "Checked");348             dataGridView2.DataSource = ds1;349             dataGridView2.DataMember = "Checked";350             menu.Text += "恭喜:/n";351             for (int i = 0; i < dataGridView2.RowCount - 1; i++)352             {353                 menu.Text += dataGridView2.Rows[i].Cells["WorkerIDAndName"].Value.ToString() + "  獲得" + dataGridView2.Rows[i].Cells["Prize"].Value.ToString() + "/n";354             }355             menu.Visible = true;356             timer3.Start();357             myconn.Close();358         }359 360         //先導入到dataSet361         public DataSet getXSLData(string filepath)362         {363             string strCon = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filepath + ";Extended Properties=/"Excel 12.0;HDR=YES;/"";364             System.Data.OleDb.OleDbConnection Conn = new System.Data.OleDb.OleDbConnection(strCon);365             string strCom = "SELECT * FROM [Sheet1$]";366             Conn.Open();367             System.Data.OleDb.OleDbDataAdapter myCommand = new System.Data.OleDb.OleDbDataAdapter(strCom, Conn);368             DataSet ds = new DataSet();369             myCommand.Fill(ds, "[Sheet1$]");370             Conn.Close();371             return ds;372         }373 374         public static int errorcount = 0;//記錄錯誤信息條數375         public static int insertcount = 0;//記錄插入成功條數376         public static int updatecount = 0;//記錄更新信息條數377 378         public bool ImportXSL(string home)379         {380             try381             {382                 DataSet ds = new DataSet();383                 //取得數據集384                 //調用上面的函數385                 ds = getXSLData(@home);386 387                 SqlConnection con = new SqlConnection(conn);388                 con.Open();389                 for (int i = 0; i < ds.Tables[0].Rows.Count; i++)390                 {391                     string WorkerID = ds.Tables[0].Rows[i][1].ToString();392                     string Name = ds.Tables[0].Rows[i][2].ToString();393                     string Checked = ds.Tables[0].Rows[i][3].ToString();394 395                     if (WorkerID != "" && Name != "")396                     {397                         string sq = string.Format("select * from Ticket where WorkerID='{0}' and Name='{1}'", WorkerID, Name);398                         SqlCommand selectcom = new SqlCommand(sq, con);399                         int count = Convert.ToInt32(selectcom.ExecuteScalar());400                         if (count > 0)401                         {402                             updatecount++;403                         }404                         else405                         {406                             string s = string.Format("insert into Ticket(WorkerID,Name,Checked) values('{0}','{1}','{2}')", WorkerID, Name,Checked);407                             SqlCommand insertcom = new SqlCommand(s, con);408                             int result = insertcom.ExecuteNonQuery();409                             insertcount++;410                         }411                     }412                 }413                 if (updatecount + insertcount == ds.Tables[0].Rows.Count)414                 {415                     return true;416                 }417                 else418                 {419                     return false;420                 }421             }422             catch (Exception e)423             {424                 return false;425             }426         }427         //導入excle428         private void button6_Click(object sender, EventArgs e)429         {430             OpenFileDialog ofd = new OpenFileDialog();431             ofd.Filter = "Microsoft Excel files(*.xls)|*.xls;*.xlsx";//過濾一下,只要表格格式的432             ofd.RestoreDirectory = true;433             ofd.FilterIndex = 1;434             ofd.AddExtension = true;435             ofd.CheckFileExists = true;436             ofd.CheckPathExists = true;437             ofd.ShowHelp = true;//是否顯示幫助按鈕438             if (ofd.ShowDialog() == DialogResult.OK)439             {440                 this.textBox1.Text = ofd.FileName;441             }   442         }443         //導入excle表格444         private void button7_Click(object sender, EventArgs e)445         {446             SqlConnection con = new SqlConnection(conn);447             con.Open();448             //清空主鍵信息,標識自增從1開始449             string sqlstr = "truncate table Ticket";450             SqlCommand comm = new SqlCommand(sqlstr,con);451             comm.ExecuteNonQuery();452             con.Close();453             if (textBox1.Text == "")454             {455                 MessageBox.Show("請選擇一張表格?。。?/span>", "溫馨提示");456                 return;457             }  458             if (ImportXSL(textBox1.Text.ToString()))459             {460                 MessageBox.Show(insertcount + "條數據導入成功!" + updatecount + "條數據重復!");461             }462             textBox1.Text = "";463         }
  1 namespace Check_Ticket  2 {  3     partial class Btn_UpLoadFile  4     {  5         /// <summary>  6         /// 必需的設計器變量。  7         /// </summary>  8         private System.ComponentModel.IContainer components = null;  9  10         /// <summary> 11         /// 清理所有正在使用的資源。 12         /// </summary> 13         /// <param name="disposing">如果應釋放托管資源,為 true;否則為 false。</param> 14         protected override void Dispose(bool disposing) 15         { 16             if (disposing && (components != null)) 17             { 18                 components.Dispose(); 19             } 20             base.Dispose(disposing); 21         } 22  23         #region Windows 窗體設計器生成的代碼 24  25         /// <summary> 26         /// 設計器支持所需的方法 - 不要 27         /// 使用代碼編輯器修改此方法的內容。 28         /// </summary> 29         private void InitializeComponent() 30         { 31             this.components = new System.ComponentModel.Container(); 32             this.lab2 = new System.Windows.Forms.Label(); 33             this.comboBox1 = new System.Windows.Forms.ComboBox(); 34             this.button1 = new System.Windows.Forms.Button(); 35             this.dataGridView1 = new System.Windows.Forms.DataGridView(); 36             this.button2 = new System.Windows.Forms.Button(); 37             this.button3 = new System.Windows.Forms.Button(); 38             this.dataGridView2 = new System.Windows.Forms.DataGridView(); 39             this.button4 = new System.Windows.Forms.Button(); 40             this.lab1 = new System.Windows.Forms.Label(); 41             this.timer1 = new System.Windows.Forms.Timer(this.components); 42             this.timer2 = new System.Windows.Forms.Timer(this.components); 43             this.button5 = new System.Windows.Forms.Button(); 44             this.lab = new System.Windows.Forms.Label(); 45             this.timer3 = new System.Windows.Forms.Timer(this.components); 46             this.menu = new System.Windows.Forms.Label(); 47             this.menuStrip1 = new System.Windows.Forms.MenuStrip(); 48             this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 49             this.附加功能ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 50             this.label1 = new System.Windows.Forms.Label(); 51             this.btnAdd = new System.Windows.Forms.Button(); 52             this.tbNum = new System.Windows.Forms.TextBox(); 53             this.ge = new System.Windows.Forms.Label(); 54             this.補抽ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 55             this.addEnd = new System.Windows.Forms.Button(); 56             this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); 57             this.button6 = new System.Windows.Forms.Button(); 58             this.textBox1 = new System.Windows.Forms.TextBox(); 59             this.button7 = new System.Windows.Forms.Button(); 60             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 61             ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit(); 62             this.menuStrip1.SuspendLayout(); 63             this.SuspendLayout(); 64             //  65             // lab2 66             //  67             this.lab2.AutoSize = true; 68             this.lab2.BackColor = System.Drawing.Color.Blue; 69             this.lab2.Font = new System.Drawing.Font("微軟雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 70             this.lab2.ForeColor = System.Drawing.Color.Red; 71             this.lab2.Location = new System.Drawing.Point(959, 323); 72             this.lab2.Name = "lab2"; 73             this.lab2.Size = new System.Drawing.Size(69, 19); 74             this.lab2.TabIndex = 2; 75             this.lab2.Text = "獎項名稱:"; 76             //  77             // comboBox1 78             //  79             this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 80             this.comboBox1.ForeColor = System.Drawing.Color.Red; 81             this.comboBox1.FormattingEnabled = true; 82             this.comboBox1.Items.AddRange(new object[] { 83             "請選擇", 84             "一等獎", 85             "二等獎", 86             "三等獎", 87             "四等獎", 88             "五等獎", 89             "六等獎"}); 90             this.comboBox1.Location = new System.Drawing.Point(1047, 322); 91             this.comboBox1.Name = "comboBox1"; 92             this.comboBox1.Size = new System.Drawing.Size(140, 20); 93             this.comboBox1.TabIndex = 3; 94             this.comboBox1.SelectedValueChanged += new System.EventHandler(this.comboBox1_SelectedValueChanged); 95             //  96             // button1 97             //  98             this.button1.Enabled = false; 99             this.button1.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));100             this.button1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));101             this.button1.Location = new System.Drawing.Point(944, 402);102             this.button1.Name = "button1";103             this.button1.Size = new System.Drawing.Size(107, 23);104             this.button1.TabIndex = 4;105             this.button1.Text = "開始抽獎";106             this.button1.UseVisualStyleBackColor = true;107             this.button1.Click += new System.EventHandler(this.button1_Click);108             // 109             // dataGridView1110             // 111             this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;112             this.dataGridView1.Location = new System.Drawing.Point(717, 486);113             this.dataGridView1.Name = "dataGridView1";114             this.dataGridView1.RowTemplate.Height = 23;115             this.dataGridView1.Size = new System.Drawing.Size(737, 199);116             this.dataGridView1.TabIndex = 5;117             this.dataGridView1.Visible = false;118             // 119             // button2120             // 121             this.button2.Enabled = false;122             this.button2.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));123             this.button2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));124             this.button2.Location = new System.Drawing.Point(1086, 401);125             this.button2.Name = "button2";126             this.button2.Size = new System.Drawing.Size(101, 23);127             this.button2.TabIndex = 6;128             this.button2.Text = "查看獲獎名單";129             this.button2.UseVisualStyleBackColor = true;130             this.button2.Click += new System.EventHandler(this.button2_Click);131             // 132             // button3133             // 134             this.button3.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));135             this.button3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));136             this.button3.Location = new System.Drawing.Point(818, 401);137             this.button3.Name = "button3";138             this.button3.Size = new System.Drawing.Size(87, 23);139             this.button3.TabIndex = 7;140             this.button3.Text = "人員加載";141             this.button3.UseVisualStyleBackColor = true;142             this.button3.Click += new System.EventHandler(this.button3_Click);143             // 144             // dataGridView2145             // 146             this.dataGridView2.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;147             this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;148             this.dataGridView2.GridColor = System.Drawing.Color.Black;149             this.dataGridView2.Location = new System.Drawing.Point(963, 486);150             this.dataGridView2.Name = "dataGridView2";151             this.dataGridView2.RowHeadersVisible = false;152             this.dataGridView2.RowTemplate.Height = 23;153             this.dataGridView2.Size = new System.Drawing.Size(203, 199);154             this.dataGridView2.TabIndex = 8;155             this.dataGridView2.Visible = false;156             // 157             // button4158             // 159             this.button4.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));160             this.button4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));161             this.button4.Location = new System.Drawing.Point(1223, 401);162             this.button4.Name = "button4";163             this.button4.Size = new System.Drawing.Size(156, 23);164             this.button4.TabIndex = 9;165             this.button4.Text = "設置獎項對應人數";166             this.button4.UseVisualStyleBackColor = true;167             this.button4.Click += new System.EventHandler(this.button4_Click);168             // 169             // lab1170             // 171             this.lab1.AutoSize = true;172             this.lab1.BackColor = System.Drawing.Color.Transparent;173             this.lab1.Font = new System.Drawing.Font("宋體", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));174             this.lab1.ForeColor = System.Drawing.Color.Blue;175             this.lab1.Location = new System.Drawing.Point(1011, 830);176             this.lab1.Name = "lab1";177             this.lab1.Size = new System.Drawing.Size(106, 24);178             this.lab1.TabIndex = 10;179             this.lab1.Text = "獲獎名單";180             // 181             // timer1182             // 183             this.timer1.Tick += new System.EventHandler(this.timer1_Tick);184             // 185             // timer2186             // 187             this.timer2.Tick += new System.EventHandler(this.timer2_Tick);188             // 189             // button5190             // 191             this.button5.Enabled = false;192             this.button5.ForeColor = System.Drawing.Color.Red;193             this.button5.Location = new System.Drawing.Point(944, 431);194             this.button5.Name = "button5";195             this.button5.Size = new System.Drawing.Size(107, 23);196             this.button5.TabIndex = 11;197             this.button5.Text = "停止抽獎";198             this.button5.UseVisualStyleBackColor = true;199             this.button5.Click += new System.EventHandler(this.button5_Click);200             // 201             // lab202             // 203             this.lab.Anchor = System.Windows.Forms.AnchorStyles.Top;204             this.lab.AutoSize = true;205             this.lab.BackColor = System.Drawing.Color.Transparent;206             this.lab.Font = new System.Drawing.Font("華文新魏", 42F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));207             this.lab.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));208             this.lab.Location = new System.Drawing.Point(753, 31);209             this.lab.Name = "lab";210             this.lab.Size = new System.Drawing.Size(595, 57);211             this.lab.TabIndex = 12;212             this.lab.Text = "善林商務年會抽獎活動";213             // 214             // timer3215             // 216             this.timer3.Tick += new System.EventHandler(this.timer3_Tick);217             // 218             // menu219             // 220             this.menu.AutoSize = true;221             this.menu.BackColor = System.Drawing.Color.Transparent;222             this.menu.Font = new System.Drawing.Font("宋體", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));223             this.menu.ForeColor = System.Drawing.Color.Blue;224             this.menu.Location = new System.Drawing.Point(269, 573);225             this.menu.Name = "menu";226             this.menu.Size = new System.Drawing.Size(0, 24);227             this.menu.TabIndex = 13;228             // 229             // menuStrip1230             // 231             this.menuStrip1.BackColor = System.Drawing.Color.Transparent;232             this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {233             this.ToolStripMenuItem,234             this.附加功能ToolStripMenuItem});235             this.menuStrip1.Location = new System.Drawing.Point(0, 0);236             this.menuStrip1.Name = "menuStrip1";237             this.menuStrip1.Size = new System.Drawing.Size(1920, 25);238             this.menuStrip1.TabIndex = 14;239             this.menuStrip1.Text = "menuStrip1";240             // 241             // ToolStripMenuItem242             // 243             this.ToolStripMenuItem.BackColor = System.Drawing.Color.Transparent;244             this.ToolStripMenuItem.ForeColor = System.Drawing.Color.Blue;245             this.ToolStripMenuItem.Name = "ToolStripMenuItem";246             this.ToolStripMenuItem.Size = new System.Drawing.Size(68, 21);247             this.ToolStripMenuItem.Text = "關閉窗口";248             this.ToolStripMenuItem.Click += new System.EventHandler(this.關閉窗口ToolStripMenuItem_Click);249             // 250             // 附加功能ToolStripMenuItem251             // 252             this.附加功能ToolStripMenuItem.Name = "附加功能ToolStripMenuItem";253             this.附加功能ToolStripMenuItem.Size = new System.Drawing.Size(12, 21);254             // 255             // label1256             // 257             this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top;258             this.label1.AutoSize = true;259             this.label1.ForeColor = System.Drawing.Color.Yellow;260             this.label1.Location = new System.Drawing.Point(747, 98);261             this.label1.Name = "label1";262             this.label1.Size = new System.Drawing.Size(614, 12);263             this.label1.TabIndex = 15;264             this.label1.Text = "---------------------------------------------------------------------------------" +265     "------";266             // 267             // btnAdd268             // 269             this.btnAdd.ForeColor = System.Drawing.Color.Indigo;270             this.btnAdd.Location = new System.Drawing.Point(1086, 431);271             this.btnAdd.Name = "btnAdd";272             this.btnAdd.Size = new System.Drawing.Size(101, 23);273             this.btnAdd.TabIndex = 16;274             this.btnAdd.Text = "補抽";275             this.btnAdd.UseVisualStyleBackColor = true;276             this.btnAdd.Visible = false;277             this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);278             // 279             // tbNum280             // 281             this.tbNum.Location = new System.Drawing.Point(1223, 431);282             this.tbNum.Name = "tbNum";283             this.tbNum.Size = new System.Drawing.Size(125, 21);284             this.tbNum.TabIndex = 17;285             this.tbNum.Text = "0";286             this.tbNum.Visible = false;287             // 288             // ge289             // 290             this.ge.AutoSize = true;291             this.ge.Font = new System.Drawing.Font("宋體", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));292             this.ge.Location = new System.Drawing.Point(1357, 438);293             this.ge.Name = "ge";294             this.ge.Size = new System.Drawing.Size(22, 14);295             this.ge.TabIndex = 18;296             this.ge.Text = "";297             this.ge.Visible = false;298             // 299             // 補抽ToolStripMenuItem300             // 301             this.補抽ToolStripMenuItem.Name = "補抽ToolStripMenuItem";302             this.補抽ToolStripMenuItem.Size = new System.Drawing.Size(32, 19);303             // 304             // addEnd305             // 306             this.addEnd.Location = new System.Drawing.Point(818, 431);307             this.addEnd.Name = "addEnd";308             this.addEnd.Size = new System.Drawing.Size(87, 23);309             this.addEnd.TabIndex = 19;310             this.addEnd.Text = "補抽結束";311             this.addEnd.UseVisualStyleBackColor = true;312             this.addEnd.Visible = false;313             this.addEnd.Click += new System.EventHandler(this.addEnd_Click);314             // 315             // openFileDialog1316             // 317             this.openFileDialog1.FileName = "openFileDialog1";318             // 319             // button6320             // 321             this.button6.Location = new System.Drawing.Point(1086, 371);322             this.button6.Name = "button6";323             this.button6.Size = new System.Drawing.Size(107, 23);324             this.button6.TabIndex = 20;325             this.button6.Text = "選擇文件";326             this.button6.UseVisualStyleBackColor = true;327             this.button6.Click += new System.EventHandler(this.button6_Click);328             // 329             // textBox1330             // 331             this.textBox1.Location = new System.Drawing.Point(818, 371);332             this.textBox1.Name = "textBox1";333             this.textBox1.Size = new System.Drawing.Size(233, 21);334             this.textBox1.TabIndex = 21;335             // 336             // button7337             // 338             this.button7.Location = new System.Drawing.Point(1223, 371);339             this.button7.Name = "button7";340             this.button7.Size = new System.Drawing.Size(156, 23);341             this.button7.TabIndex = 22;342             this.button7.Text = "上傳文件";343             this.button7.UseVisualStyleBackColor = true;344             this.button7.Click += new System.EventHandler(this.button7_Click);345             // 346             // Btn_UpLoadFile347             // 348             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);349             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;350             this.BackColor = System.Drawing.Color.Red;351             this.ClientSize = new System.Drawing.Size(1920, 1038);352             this.Controls.Add(this.button7);353             this.Controls.Add(this.textBox1);354             this.Controls.Add(this.button6);355             this.Controls.Add(this.addEnd);356             this.Controls.Add(this.ge);357             this.Controls.Add(this.tbNum);358             this.Controls.Add(this.btnAdd);359             this.Controls.Add(this.label1);360             this.Controls.Add(this.menu);361             this.Controls.Add(this.lab);362             this.Controls.Add(this.button5);363             this.Controls.Add(this.lab1);364             this.Controls.Add(this.button4);365             this.Controls.Add(this.dataGridView2);366             this.Controls.Add(this.button3);367             this.Controls.Add(this.button2);368             this.Controls.Add(this.comboBox1);369             this.Controls.Add(this.dataGridView1);370             this.Controls.Add(this.button1);371             this.Controls.Add(this.lab2);372             this.Controls.Add(this.menuStrip1);373             this.DoubleBuffered = true;374             this.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));375             this.ForeColor = System.Drawing.Color.Purple;376             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;377             this.MainMenuStrip = this.menuStrip1;378             this.MaximumSize = new System.Drawing.Size(2237, 1080);379             this.MinimumSize = new System.Drawing.Size(1918, 1038);380             this.Name = "Btn_UpLoadFile";381             this.ShowIcon = false;382             this.Text = "抽獎界面";383             this.Load += new System.EventHandler(this.Form1_Load);384             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();385             ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();386             this.menuStrip1.ResumeLayout(false);387             this.menuStrip1.PerformLayout();388             this.ResumeLayout(false);389             this.PerformLayout();390 391         }392 393         #endregion394 395         private System.Windows.Forms.Label lab2;396         private System.Windows.Forms.ComboBox comboBox1;397         private System.Windows.Forms.Button button1;398         private System.Windows.Forms.DataGridView dataGridView1;399         private System.Windows.Forms.Button button2;400         private System.Windows.Forms.Button button3;401         private System.Windows.Forms.DataGridView dataGridView2;402         private System.Windows.Forms.Button button4;403         private System.Windows.Forms.Label lab1;404         private System.Windows.Forms.Timer timer1;405         private System.Windows.Forms.Timer timer2;406         private System.Windows.Forms.Button button5;407         private System.Windows.Forms.Label lab;408         private System.Windows.Forms.Timer timer3;409         private System.Windows.Forms.Label menu;410         private System.Windows.Forms.MenuStrip menuStrip1;411         private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;412         private System.Windows.Forms.Label label1;413         private System.Windows.Forms.Button btnAdd;414         private System.Windows.Forms.TextBox tbNum;415         private System.Windows.Forms.Label ge;416         private System.Windows.Forms.ToolStripMenuItem 附加功能ToolStripMenuItem;417         private System.Windows.Forms.ToolStripMenuItem 補抽ToolStripMenuItem;418         private System.Windows.Forms.Button addEnd;419         private System.Windows.Forms.OpenFileDialog openFileDialog1;420         private System.Windows.Forms.Button button6;421         private System.Windows.Forms.TextBox textBox1;422         private System.Windows.Forms.Button button7;423     }424 }

 

464     }465 }

數據庫設計

界面


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
国产精品吊钟奶在线| 亚洲精品视频免费在线观看| 日本91av在线播放| 欧美怡春院一区二区三区| 成人免费高清完整版在线观看| 亚洲天堂av网| 福利二区91精品bt7086| 亚洲欧美激情四射在线日| 中文字幕久久久| 92国产精品久久久久首页| 国产在线不卡精品| 91精品视频免费看| 日日狠狠久久偷偷四色综合免费| 中文字幕欧美精品在线| 91人成网站www| 久久精品在线播放| 欧美又大又硬又粗bbbbb| 91精品国产亚洲| 欧美日产国产成人免费图片| 日本精品免费一区二区三区| xvideos国产精品| 亚洲的天堂在线中文字幕| 欧美在线日韩在线| 亚洲午夜未满十八勿入免费观看全集| 国产丝袜视频一区| 九九精品在线播放| 青青久久av北条麻妃海外网| 日本高清视频一区| 欧美激情图片区| 日韩成人激情影院| 在线视频国产日韩| 日韩在线视频二区| 国产精品99久久久久久久久| 91精品国产91久久久久久久久| 中文字幕不卡在线视频极品| 中文字幕日韩在线观看| 亚洲视频欧洲视频| 九九热精品在线| 热99精品只有里视频精品| 日韩美女在线观看| 亚洲精品xxx| 国产一区二区丝袜高跟鞋图片| 国产69精品久久久久99| 国产视频精品久久久| 日韩精品www| 欧美日韩福利电影| 中文精品99久久国产香蕉| 欧美中文字幕第一页| 久久综合色影院| 亚洲人成伊人成综合网久久久| 91美女片黄在线观| 欧美国产日本在线| 亚洲无线码在线一区观看| 欧美日韩亚洲系列| 国产精品久久久久aaaa九色| 精品偷拍各种wc美女嘘嘘| 国产香蕉一区二区三区在线视频| 日韩网站免费观看| 亚洲aⅴ日韩av电影在线观看| www高清在线视频日韩欧美| 国产一区二区三区毛片| 欧美性做爰毛片| 欧美丰满少妇xxxxx做受| 国产激情视频一区| 91大神在线播放精品| 国产精品精品久久久久久| 欧美风情在线观看| 成人在线视频网| 国产精品91在线观看| 欧美精品一区在线播放| 在线精品视频视频中文字幕| 日本精品va在线观看| 国产精品福利观看| 久久不射电影网| 亚洲欧美在线免费| 欧美精品videos性欧美| 国产一区二区三区视频免费| 欧美xxxx18国产| 亚洲精品美女在线| 亚洲理论在线a中文字幕| 精品自拍视频在线观看| 97热在线精品视频在线观看| 国产精品高潮呻吟久久av无限| 久久精品色欧美aⅴ一区二区| 欧美老女人性视频| 中文字幕日韩精品有码视频| 久久视频在线视频| 在线观看日韩欧美| 久久久久久久久国产| 97超级碰碰碰久久久| 国产精品永久免费在线| 日韩欧美在线看| 91久久久亚洲精品| 色噜噜狠狠狠综合曰曰曰88av| 97在线精品国自产拍中文| 欧美在线视频免费播放| 亚洲国产黄色片| 亚洲一区二区三区视频| 日韩av日韩在线观看| 成人av番号网| 亚洲成人黄色在线| 最近2019中文免费高清视频观看www99| 欧美日韩国产成人在线| 久久综合色88| 亚洲欧美日韩直播| 亚洲欧美日韩精品久久奇米色影视| 国产成人福利视频| 亚洲综合大片69999| 日韩av在线影院| 俺去了亚洲欧美日韩| 欧洲成人在线观看| 中文字幕在线日韩| 成人午夜在线观看| 亚洲精品中文字幕女同| 亚洲大胆人体在线| 亚洲少妇中文在线| 国产精品美腿一区在线看| 日韩av电影中文字幕| 日韩激情片免费| 国产精品扒开腿做爽爽爽视频| 欧美性xxxx极品高清hd直播| 伊人伊成久久人综合网小说| 亚洲欧美日韩精品久久奇米色影视| 国精产品一区一区三区有限在线| 国产一区二区三区在线| 国内精久久久久久久久久人| 粗暴蹂躏中文一区二区三区| 亚洲色图15p| 亚洲人成伊人成综合网久久久| 国产精品一香蕉国产线看观看| 一区二区中文字幕| 日韩在线视频导航| 国产精品美乳一区二区免费| 中文字幕亚洲欧美日韩在线不卡| 狠狠躁天天躁日日躁欧美| 久久综合免费视频影院| 日韩av中文在线| 亚洲高清一二三区| 久久激情视频久久| 69视频在线播放| 欧美黄色三级网站| 欧美中文在线观看| 欧美最猛性xxxxx免费| 国产成人激情小视频| 亚洲精品网址在线观看| 欧美日韩免费在线| 亚洲精品视频免费在线观看| 亚洲福利在线视频| 疯狂做受xxxx高潮欧美日本| 精品福利在线观看| 亚洲精品网址在线观看| 国产日产欧美精品| 久久91精品国产91久久久| 亚洲天堂男人天堂女人天堂| 久久久久久久国产精品视频| 亚洲激情国产精品| 在线日韩av观看| 国产色综合天天综合网| 国产精品丝袜久久久久久不卡| 亚洲国产福利在线| 热99精品只有里视频精品| 亚洲最大av网| 911国产网站尤物在线观看| 北条麻妃在线一区二区|