Esempio n. 1
0
        private void initUnit()
        {
            analyzeTendencyUnit(Lt_Units, "ThreeBeforeStart", "ThreeAfterStart");
            winLottery.CalculatorUnitWinLottery(Lt_Units, "Num1", this.Before_After_Threel.HeaderText);

            if (winLottery.Lt_UnitWinLotterys.Count > 0)
            {
                var vs  = winLottery.Lt_UnitWinLotterys.GroupBy(a => new { a.UnitName, a.KjLong }).Select(g => (new { UnitName = g.Key.UnitName, KjLong = g.Key.KjLong, Count = g.Count() })).OrderBy(l => l.UnitName).ThenBy(l => l.KjLong).ToList();
                int sum = vs.Sum(l => l.Count);
                int max = vs.Max(l => l.KjLong);

                var vSum = vs.GroupBy(l => l.UnitName).Select(g => new { UnitName = g.Key, Sum = g.Sum(k => k.Count) }).ToList();
                DgvController.AddRows(this.dgvUnitTj, vs.Count + 1);
                for (int i = 0; i < vs.Count; i++)
                {
                    this.dgvUnitTj[0, i].Value = i + 1;
                    this.dgvUnitTj[1, i].Value = vs[i].UnitName;
                    this.dgvUnitTj[2, i].Value = vs[i].KjLong;
                    this.dgvUnitTj[3, i].Value = vs[i].Count;
                }

                this.dgvUnitTj[0, vs.Count].Value = vs.Count + 1;
                this.dgvUnitTj[1, vs.Count].Value = "总开奖次数";
                this.dgvUnitTj[2, vs.Count].Value = max;
                this.dgvUnitTj[3, vs.Count].Value = sum;
            }

            if (Lt_Units.Count > 0)
            {
                DgvController.AddRows(this.dgvUnit, Lt_Units.Count);
                initDgv1();
            }
        }
Esempio n. 2
0
        private void initUnit()
        {
            if (this.rtbBigSmall.Checked)
            {
                analyzeTendencyUnit(Lt_Units, "Big", "Small", "BigSmall", "SmallBig");
            }
            else if (this.rtbOddPair.Checked)
            {
                analyzeTendencyUnit(Lt_Units, "Odd", "Pair", "OddPair", "PairOdd");
            }

            winLottery.Lt_UnitWinLotterys.Clear();
            winLottery.CalculatorUnitWinLottery(Lt_Units, "Num1", this.Big_Small.HeaderText);
            winLottery.CalculatorUnitWinLottery(Lt_Units, "Num2", this.dataGridViewTextBoxColumn6.HeaderText);

            if (winLottery.Lt_UnitWinLotterys.Count > 0)
            {
                //DgvController.AddRows(this.dgvUnitTj, winLottery.Lt_UnitWinLotterys.Count);

                var vs  = winLottery.Lt_UnitWinLotterys.GroupBy(a => new { a.UnitName, a.KjLong }).Select(g => (new { UnitName = g.Key.UnitName, KjLong = g.Key.KjLong, Count = g.Count() })).OrderBy(l => l.UnitName).ThenBy(l => l.KjLong).ToList();
                int sum = vs.Sum(l => l.Count);
                int max = vs.Max(l => l.KjLong);

                var vSum = vs.GroupBy(l => l.UnitName).Select(g => new { UnitName = g.Key, Sum = g.Sum(k => k.Count) }).ToList();
                DgvController.AddRows(this.dgvUnitTj, vs.Count + 1);
                for (int i = 0; i < vs.Count; i++)
                {
                    this.dgvUnitTj[0, i].Value = i + 1;
                    this.dgvUnitTj[1, i].Value = vs[i].UnitName;
                    this.dgvUnitTj[2, i].Value = vs[i].KjLong;
                    this.dgvUnitTj[3, i].Value = vs[i].Count;
                }

                this.dgvUnitTj[0, vs.Count].Value = vs.Count + 1;
                this.dgvUnitTj[1, vs.Count].Value = "总开奖次数";
                this.dgvUnitTj[2, vs.Count].Value = max;
                this.dgvUnitTj[3, vs.Count].Value = sum;
            }

            if (Lt_Units.Count > 0)
            {
                DgvController.AddRows(this.dgvUnit, Lt_Units.Count);
                initDgv1();
            }
        }