public static void Huice() { DateTime stardate = DateTime.Today.AddDays(-3); CPQaunt.DataAccess.Tcp_HiscodeCollection collection = new CPQaunt.DataAccess.Tcp_HiscodeCollection(); collection.ListByDate(stardate, DateTime.Today.AddDays(1)); for (int i = 0; i < collection.DataTable.Rows.Count; i++) { NumberModel number = new NumberModel(); string[] sl = collection.DataTable.Rows[i]["opencode"].ToString().Split(','); number.N1 = int.Parse(sl[0]); number.N2 = int.Parse(sl[1]); number.N3 = int.Parse(sl[2]); number.N4 = int.Parse(sl[3]); number.N5 = int.Parse(sl[4]); if (number.N1 != 3 && number.N2 != 3 && number.N3 != 3 && number.N4 != 3 && number.N5 != 3) { if (number.N1 != 6 && number.N2 != 6 && number.N3 != 6 && number.N4 != 6 && number.N5 != 6) { if (number.N1 != 9 && number.N2 != 9 && number.N3 != 9 && number.N4 != 9 && number.N5 != 9) { winnercount = winnercount + 1; yingliamount = yingliamount + 950; } } } failcount = failcount + 1; xiazhuamount = xiazhuamount + 168; Console.WriteLine("总下注:" + collection.DataTable.Rows.Count + "-----没中:" + failcount + "---中了" + winnercount + "-----总收益:" + yingliamount + " -----总下注" + xiazhuamount); } }
public static void Huice() { DateTime stardate = DateTime.Today.AddDays(-3); CPQaunt.DataAccess.Tcp_HiscodeCollection collection = new CPQaunt.DataAccess.Tcp_HiscodeCollection(); collection.ListByDate(stardate, DateTime.Today.AddDays(1)); for (int i = 0; i < collection.DataTable.Rows.Count; i++) { betscount = betscount + 1; if (collection.DataTable.Rows[i]["opencode"].ToString() == "4,5,3,3,6") { } List <NumberModel> mylist = Enter(collection.DataTable.Rows[i]["expect"].ToString()); NumberModel number = new NumberModel(); string[] sl = collection.DataTable.Rows[i]["opencode"].ToString().Split(','); number.N1 = int.Parse(sl[0]); number.N2 = int.Parse(sl[1]); number.N3 = int.Parse(sl[2]); number.N4 = int.Parse(sl[3]); number.N5 = int.Parse(sl[4]); decimal setamount = mylist.Count * 0.001m; decimal getamount = 0 - setamount; string res = collection.DataTable.Rows[i]["expect"] + "-----" + collection.DataTable.Rows[i]["opencode"] + "---没中啊? 下注:" + setamount + " --盈利:" + getamount; foreach (var item in mylist) { if (item.N1 == number.N1 && item.N2 == number.N2 && item.N3 == number.N3 && item.N4 == number.N4 && item.N5 == number.N5) { winnercount = winnercount + 1; getamount = 95 - setamount; res = collection.DataTable.Rows[i]["expect"] + "-----" + collection.DataTable.Rows[i]["opencode"] + "---中奖啦! 下注:" + setamount + " --盈利:" + getamount; } } failcount = failcount + 1; xiazhuamount = xiazhuamount + setamount; yingliamount = yingliamount + getamount; Console.WriteLine(res + "---没中:" + failcount + "---中了" + winnercount); } Console.WriteLine("总下注:" + collection.DataTable.Rows.Count + "-----没中:" + failcount + "---中了" + winnercount + "-----总收益:" + yingliamount + " -----总下注" + xiazhuamount); }
public static void Kill() { DateTime stardate = DateTime.Today.AddDays(-10); CPQaunt.DataAccess.Tcp_HiscodeCollection collection = new CPQaunt.DataAccess.Tcp_HiscodeCollection(); collection.ListByDate(stardate, DateTime.Today.AddDays(1)); for (int i = 0; i < collection.DataTable.Rows.Count; i++) { int ik = i; if (ik - 1 > 0) { ik = ik - 1; } NumberModel number0 = new NumberModel(); string[] sl0 = collection.DataTable.Rows[ik]["opencode"].ToString().Split(','); number0.N1 = int.Parse(sl0[0]); number0.N2 = int.Parse(sl0[1]); number0.N3 = int.Parse(sl0[2]); number0.N4 = int.Parse(sl0[3]); number0.N5 = int.Parse(sl0[4]); NumberModel number = new NumberModel(); string[] sl = collection.DataTable.Rows[i]["opencode"].ToString().Split(','); number.N1 = int.Parse(sl[0]); number.N2 = int.Parse(sl[1]); number.N3 = int.Parse(sl[2]); number.N4 = int.Parse(sl[3]); number.N5 = int.Parse(sl[4]); string qihao = collection.DataTable.Rows[i]["expect"].ToString(); int kill1 = number0.N5; string str = (number0.N1 + number0.N2 + number0.N3 + number0.N4 + number0.N5).ToString(); int kill2 = int.Parse(str.Substring(str.Length - 1, 1)); iswinner = "没中奖"; if (kill1 == kill2) { kill2 = int.Parse(qihao.Substring(qihao.Length - 1, 1)) + 1; } if (number.N1 != kill1 && number.N2 != kill1 && number.N3 != kill1 && number.N4 != kill1 && number.N5 != kill1) { if (number.N1 != kill2 && number.N2 != kill2 && number.N3 != kill2 && number.N4 != kill2 && number.N5 != kill2) { winnercount = winnercount + 1; yingliamount = yingliamount + 950; iswinner = "中奖了"; } else { failcount = failcount + 1; } } else { failcount = failcount + 1; } xiazhuamount = xiazhuamount + 328; Console.WriteLine(i + ":结果:" + iswinner + "----总收益:" + yingliamount + " -----总支出" + xiazhuamount + "----开奖号码:" + number.GetString() + "----杀号" + kill1 + "," + kill2); } Console.WriteLine("总下注:" + collection.DataTable.Rows.Count + "-----没中:" + failcount + "---中了" + winnercount + "--中奖率:" + ((winnercount * 100 / collection.DataTable.Rows.Count)) + "%" + "--盈亏:" + (yingliamount - xiazhuamount), ConsoleColor.Green); }