private void Prediction2_Load(object sender, EventArgs e) { EditXml EXml = new EditXml(); EXml.DetDB(); number = new decimal[39]; getTwoNunber(); int i = 0; }
private void Prediction_Load(object sender, EventArgs e) { textBox1.Enabled = false; textBox2.Enabled = false; textBox3.Enabled = false; textBox4.Enabled = false; textBox5.Enabled = false; textBox6.Enabled = false; textBox7.Enabled = false; textBox8.Enabled = false; textBox9.Enabled = false; textBox10.Enabled = false; textBox11.Enabled = false; textBox12.Enabled = false; textBox13.Enabled = false; textBox14.Enabled = false; textBox15.Enabled = false; EditXml EXml = new EditXml(); switch (SelectGame) { case 0: NumberLenght = 39; countball = 5; break; case 1: NumberLenght = 38; countball = 6; break; case 2: NumberLenght = 40; countball = 7; break; case 3: NumberLenght = 49; countball = 6; break; case 4: NumberLenght = 49; countball = 6; break; } NumberWeighted = new float[NumberLenght]; NumberAndNumber = new int[NumberLenght, NumberLenght]; EXml.DetDB(); }
private void Revise_Load(object sender, EventArgs e) { ///ieieie EditXml EXml = new EditXml(); EXml.DetDB(); bCheck = false; textNo.Text = ""; textNum1.Text = ""; textNum2.Text = ""; textNum3.Text = ""; textNum4.Text = ""; textNum5.Text = ""; //setdate(); dgvDataSet(); }
private void SplitGraph_Load(object sender, EventArgs e) { EditXml EXml = new EditXml(); EXml.DetDB(); using (var m_sqlConn = new SqlConnection(EditXml.strConnectionSetting)) { //107000251 m_sqlConn.Open(); string str = "Select * from[" + EditXml.strSettingDBName + "].[dbo].[tMe] where [No]>107000212 "; using (var sqlcmd = new SqlCommand(str, m_sqlConn)) { using (var sqlr = sqlcmd.ExecuteReader()) { int z = 0; while (sqlr.Read()) { z++; for (int i = 1; i < 5; i++) { for (int ii = i + 1; ii < 6; ii++) { int x = Convert.ToInt32(sqlr["Number" + i.ToString()]); int y = Convert.ToInt32(sqlr["Number" + ii.ToString()]); data[x - 1, y - 1]++; } } } Console.Write(z.ToString()); } } dataGridView1.ColumnCount = 39; for (int i = 1; i < 40; i++) { dataGridView1.Columns[i - 1].Name = i.ToString(); dataGridView1.Columns[i - 1].Width = 50; } for (int i = 1; i < 40; i++) { string [] x = new string[39]; for (int ii = 1; ii < 40; ii++) { x[ii - 1] = data[i - 1, ii - 1].ToString(); switch (data[i - 1, ii - 1]) { case 1: s1 += ",(" + i.ToString() + "," + ii.ToString() + ")"; break; case 2: s2 += ",(" + i.ToString() + "," + ii.ToString() + ")"; break; case 3: s3 += ",(" + i.ToString() + "," + ii.ToString() + ")"; break; case 4: s4 += ",(" + i.ToString() + "," + ii.ToString() + ")"; break; } } dataGridView1.Rows.Add(x); dataGridView1.Rows[i - 1].Cells[i - 1].Style.BackColor = Color.Black; for (int y = 0; y < 39; y++) { if (x[y] == "0") { dataGridView1.Rows[i - 1].Cells[y].Style.BackColor = Color.Black; } } } } }