コード例 #1
0
ファイル: fmTMTJ.cs プロジェクト: tanzw/six
        private void fmTMTJ_Load(object sender, EventArgs e)
        {
            Common.BindCustomers(cbxCustomerId);
            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text = winService.GetNewIssue().Body;
        }
コード例 #2
0
        private void fmFastTM_Load(object sender, EventArgs e)
        {
            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text           = winService.GetNewIssue().Body;
            this.txtMoney.KeyPress += new KeyPressEventHandler(Common.TextBox_FilterString_KeyPress);
            Common.BindCustomers(cbxCustomer, (sender1, e1) =>
            {
                if (cbxCustomer.SelectedIndex != 0)
                {
                    OrderImpl orderservice = new OrderImpl();
                    textBox1.Text          = orderservice.GetMaxIndex(cbxCustomer.SelectedValue.ToString(), txtIssue.Text.Trim()).Body.ToString();
                }

                OddsImpl oddservice = new OddsImpl();
                var r = oddservice.GetList(cbxCustomer.SelectedValue.ToTryInt());
                tm    = r.Body.FirstOrDefault(x => x.ChildType == childType);
                if (tm == null)
                {
                    MessageEx.ShowWarning("未设置客户赔率");
                    tm            = new OddsData();
                    tm.CustomerId = cbxCustomer.SelectedValue.ToTryInt();
                    tm.PL         = 00.00M;
                    tm.FS         = 0M;
                }
                Common.CustomerId = cbxCustomer.SelectedValue.ToTryInt();
            });
            listView1.GridLines     = true;
            listView1.FullRowSelect = true;
            listView1.View          = View.Details;
            listView1.Scrollable    = true;
            listView1.MultiSelect   = false;
        }
コード例 #3
0
        private void fmTM_Load(object sender, EventArgs e)
        {
            Common.BindCustomers(this.cbox, (sender1, e1) =>
            {
                var value = "00.00";
                if (this.cbox.SelectedIndex == 0)
                {
                }
                else
                {
                    OddsImpl oddservice = new OddsImpl();
                    var r        = oddservice.GetList(cbox.SelectedValue.ToTryInt());
                    var oddsList = r.Body.FirstOrDefault(x => x.ChildType == (int)ChildType.特码);
                    if (oddsList != null)
                    {
                        value = oddsList.PL.ToMoney();
                    }
                    Common.CustomerId = cbox.SelectedValue.ToTryInt();
                }
                var controls = this.groupBox2.Controls.Find("PL", false);
                foreach (var control in controls)
                {
                    if (control is Label)
                    {
                        var t  = control as Label;
                        t.Text = value;
                    }
                }
            });
            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text = winService.GetNewIssue().Body;
        }
コード例 #4
0
ファイル: fmTotal.cs プロジェクト: tanzw/six
        private void fmTotal_Load(object sender, EventArgs e)
        {
            Common.BindCustomers(cbxCustomerId);
            WinNumberImpl service = new WinNumberImpl();

            txtIssue.Text = service.GetNewIssue(true).Body;
            BindDataSource();
        }
コード例 #5
0
        private void fmFastLX_Load(object sender, EventArgs e)
        {
            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text           = winService.GetNewIssue().Body;
            this.txtMoney.KeyPress += new KeyPressEventHandler(Common.TextBox_FilterString_KeyPress);


            Common.BindLXType(comboBox1, (sender1, e1) =>
            {
                if (cbxCustomer.SelectedIndex == 0 || comboBox1.SelectedIndex == 0)
                {
                    return;
                }
                OddsImpl oddservice = new OddsImpl();
                var r        = oddservice.GetList(cbxCustomer.SelectedValue.ToTryInt());
                var oddsList = r.Body.FirstOrDefault(x => x.ChildType == comboBox1.SelectedValue.ToTryInt());
                if (oddsList != null)
                {
                    odds = Newtonsoft.Json.JsonConvert.DeserializeObject <LXOdds>(oddsList.strJson);
                }
                else
                {
                    odds      = new LXOdds();
                    odds.List = new Dictionary <int, decimal>();
                }
            });
            Common.BindCustomers(cbxCustomer, (sender1, e1) =>
            {
                if (cbxCustomer.SelectedIndex != 0)
                {
                    OrderImpl orderservice = new OrderImpl();
                    textBox1.Text          = orderservice.GetMaxIndex(cbxCustomer.SelectedValue.ToString(), txtIssue.Text.Trim()).Body.ToString();
                }
                if (cbxCustomer.SelectedIndex == 0 || comboBox1.SelectedIndex == 0)
                {
                    return;
                }
                OddsImpl oddservice = new OddsImpl();
                var r        = oddservice.GetList(cbxCustomer.SelectedValue.ToTryInt());
                var oddsList = r.Body.FirstOrDefault(x => x.ChildType == comboBox1.SelectedValue.ToTryInt());
                if (oddsList != null)
                {
                    odds = Newtonsoft.Json.JsonConvert.DeserializeObject <LXOdds>(oddsList.strJson);
                }
                else
                {
                    odds      = new LXOdds();
                    odds.List = new Dictionary <int, decimal>();
                }
                Common.CustomerId = cbxCustomer.SelectedValue.ToTryInt();
            });
            listView1.GridLines     = true;
            listView1.FullRowSelect = true;
            listView1.View          = View.Details;
            listView1.Scrollable    = true;
            listView1.MultiSelect   = false;
        }
コード例 #6
0
        public fmPTYX()
        {
            InitializeComponent();
            InitOptions();
            InitOptions2();
            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text = winService.GetNewIssue().Body;
        }
コード例 #7
0
        private void fmLM_Load(object sender, EventArgs e)
        {
            this.txtMoney.KeyPress += new KeyPressEventHandler(Common.TextBox_FilterString_KeyPress);

            InitOption();

            Common.BindCustomers(this.cbox, (sender1, e1) =>
            {
                var controls = this.groupBox2.Controls.Find("PL", false);

                if (this.cbox.SelectedIndex == 0)
                {
                    lbEZE.Text = "0";
                    lbTP.Text  = "0";
                    lbSQZ.Text = "0";
                    lbSZE.Text = "0";
                    lbSZS.Text = "0";
                }
                else
                {
                    OddsImpl oddservice = new OddsImpl();
                    var r        = oddservice.GetList(cbox.SelectedValue.ToTryInt());
                    var oddsList = r.Body.Where(x => x.OrderType == (int)OrderType.连码).ToList();

                    Common.CustomerId = cbox.SelectedValue.ToTryInt();
                    foreach (var item in oddsList)
                    {
                        switch (item.ChildType)
                        {
                        case (int)ChildType.全中:
                            lbSQZ.Text = item.PL.ToString();
                            break;

                        case (int)ChildType.中三:
                            lbSZS.Text = item.PL.ToString();
                            break;

                        case (int)ChildType.中二:
                            lbSZE.Text = item.PL.ToString();
                            break;

                        case (int)ChildType.二全中:
                            lbEZE.Text = item.PL.ToString();
                            break;

                        case (int)ChildType.特碰:
                            lbTP.Text = item.PL.ToString();
                            break;
                        }
                    }
                }
            });

            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text = winService.GetNewIssue().Body;
        }
コード例 #8
0
ファイル: ULX.cs プロジェクト: tanzw/six
        public void InitControls()
        {
            //   this.BackColor = Color.Yellow;



            this.txtMoney.KeyPress += new KeyPressEventHandler(Common.TextBox_FilterString_KeyPress);
            InitOptions();
            Common.BindCustomers(this.cbox, (sender1, e1) =>
            {
                var controls = this.groupBox2.Controls.Find("PL", false);

                if (this.cbox.SelectedIndex == 0)
                {
                    foreach (var control in controls)
                    {
                        if (control is Label)
                        {
                            var t  = control as Label;
                            t.Text = "00.00";
                        }
                    }
                }
                else
                {
                    OddsImpl oddservice = new OddsImpl();
                    var r        = oddservice.GetList(cbox.SelectedValue.ToTryInt());
                    var oddsList = r.Body.FirstOrDefault(x => x.ChildType == ChildType);
                    if (oddsList != null)
                    {
                        var ptyx = Newtonsoft.Json.JsonConvert.DeserializeObject <LXOdds>(oddsList.strJson);
                        foreach (var control in controls)
                        {
                            if (control is Label)
                            {
                                var t  = control as Label;
                                t.Text = ptyx.List.FirstOrDefault(x => x.Key == t.Tag.ToTryInt()).Value.ToMoney();
                            }
                        }
                    }
                    Common.CustomerId = cbox.SelectedValue.ToTryInt();
                }
            });

            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text = winService.GetNewIssue().Body;
        }
コード例 #9
0
ファイル: fmQBZ.cs プロジェクト: tanzw/six
        private void fmQBZ_Load(object sender, EventArgs e)
        {
            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text = winService.GetNewIssue().Body;

            Common.BindCustomers(cbox, (sender1, e1) =>
            {
                if (this.cbox.SelectedIndex == 0)
                {
                }
                else
                {
                    OddsImpl oddservice = new OddsImpl();
                    oddsList            = oddservice.GetList(cbox.SelectedValue.ToTryInt()).Body;
                    Common.CustomerId   = cbox.SelectedValue.ToTryInt();
                }
            });
        }
コード例 #10
0
ファイル: fmDXDS.cs プロジェクト: tanzw/six
        private void fmDXDS_Load(object sender, EventArgs e)
        {
            InitControls();
            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text = winService.GetNewIssue().Body;

            Common.BindCustomers(cbox, (sender1, e1) =>
            {
                if (this.cbox.SelectedIndex == 0)
                {
                    lbhd.Text  = "0.00";
                    lbhs.Text  = "0.00";
                    lbhda.Text = "0.00";
                    lbhx.Text  = "0.00";
                    lbhxd.Text = "0.00";
                    lbhxs.Text = "0.00";
                    lbhdd.Text = "0.00";
                    lbhds.Text = "0.00";

                    lbtd.Text  = "0.00";
                    lbts.Text  = "0.00";
                    lbtda.Text = "0.00";
                    lbtx.Text  = "0.00";
                    lbtxd.Text = "0.00";
                    lbtxs.Text = "0.00";
                    lbtdd.Text = "0.00";
                    lbtds.Text = "0.00";
                }
                else
                {
                    OddsImpl oddservice = new OddsImpl();
                    var r        = oddservice.GetList(cbox.SelectedValue.ToTryInt());
                    var oddsList = r.Body.Where(x => x.OrderType == (int)OrderType.大小单双).ToList();
                    if (oddsList != null && oddsList.Count > 0)
                    {
                        oddsList.ForEach(x =>
                        {
                            switch (x.ChildType)
                            {
                                #region 特大单双
                            case (int)ChildType.特单:
                                lbtd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.特双:
                                lbts.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.特大:
                                lbtda.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.特小:
                                lbtx.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.特大单:
                                lbtdd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.特大双:
                                lbtds.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.特小单:
                                lbtxd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.特小双:
                                lbtxs.Text = x.PL.ToString();
                                break;

                                #endregion

                                #region  合大小单双

                            case (int)ChildType.合单:
                                lbhd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.合双:
                                lbhs.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.合大:
                                lbhda.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.合小:
                                lbhx.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.合大单:
                                lbhdd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.合大双:
                                lbhds.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.合小单:
                                lbhxd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.合小双:
                                lbhxs.Text = x.PL.ToString();
                                break;

                                #endregion
                            }
                        });
                    }
                    else
                    {
                        lbhd.Text  = "0.00";
                        lbhs.Text  = "0.00";
                        lbhda.Text = "0.00";
                        lbhx.Text  = "0.00";
                        lbhxd.Text = "0.00";
                        lbhxs.Text = "0.00";
                        lbhdd.Text = "0.00";
                        lbhds.Text = "0.00";

                        lbtd.Text  = "0.00";
                        lbts.Text  = "0.00";
                        lbtda.Text = "0.00";
                        lbtx.Text  = "0.00";
                        lbtxd.Text = "0.00";
                        lbtxs.Text = "0.00";
                        lbtdd.Text = "0.00";
                        lbtds.Text = "0.00";
                    }
                    Common.CustomerId = cbox.SelectedValue.ToTryInt();
                }
            });
        }
コード例 #11
0
ファイル: fmMain.cs プロジェクト: tanzw/six
        public void InitControls()
        {
            Common.BindCustomers(cbxCustomerId);

            List <Model.Customers> list = new List <Model.Customers>();

            list.Add(new Model.Customers()
            {
                Id = 0, Name = "请选择"
            });
            list.Add(new Model.Customers()
            {
                Id = (int)OrderType.特码, Name = "特码"
            });
            list.Add(new Model.Customers()
            {
                Id = (int)OrderType.连肖, Name = "连肖"
            });
            list.Add(new Model.Customers()
            {
                Id = (int)OrderType.连码, Name = "连码"
            });
            list.Add(new Model.Customers()
            {
                Id = (int)OrderType.平特, Name = "平特"
            });
            list.Add(new Model.Customers()
            {
                Id = (int)OrderType.尾数, Name = "尾数"
            });
            list.Add(new Model.Customers()
            {
                Id = (int)OrderType.波色, Name = "波色"
            });
            list.Add(new Model.Customers()
            {
                Id = (int)OrderType.大小单双, Name = "大小单双"
            });

            List <Model.Customers> list1 = new List <Model.Customers>();

            list1.Add(new Model.Customers()
            {
                Id = 0, Name = "请选择"
            });
            list1.Add(new Model.Customers()
            {
                Id = 2, Name = "已中奖"
            });
            list1.Add(new Model.Customers()
            {
                Id = 1, Name = "未中奖"
            });


            cbxOrderType.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxOrderType.DataSource    = list;
            cbxOrderType.DisplayMember = "Name";
            cbxOrderType.ValueMember   = "Id";


            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text = winService.GetNewIssue().Body;
        }
コード例 #12
0
        private void fmBS_Load(object sender, EventArgs e)
        {
            InitControls();
            WinNumberImpl winService = new WinNumberImpl();

            txtIssue.Text = winService.GetNewIssue().Body;

            Common.BindCustomers(cbox, (sender1, e1) =>
            {
                if (this.cbox.SelectedIndex == 0)
                {
                    lbhb.Text  = "0.00";
                    lbhd.Text  = "0.00";
                    lbhs.Text  = "0.00";
                    lbhda.Text = "0.00";
                    lbhx.Text  = "0.00";
                    lbhxd.Text = "0.00";
                    lbhxs.Text = "0.00";
                    lbhdd.Text = "0.00";
                    lbhds.Text = "0.00";

                    lblb.Text  = "0.00";
                    lbld.Text  = "0.00";
                    lbls.Text  = "0.00";
                    lblda.Text = "0.00";
                    lblx.Text  = "0.00";
                    lblxd.Text = "0.00";
                    lblxs.Text = "0.00";
                    lbldd.Text = "0.00";
                    lblds.Text = "0.00";

                    lblanb.Text  = "0.00";
                    lbland.Text  = "0.00";
                    lblans.Text  = "0.00";
                    lblanda.Text = "0.00";
                    lblanx.Text  = "0.00";
                    lblanxd.Text = "0.00";
                    lblanxs.Text = "0.00";
                    lblandd.Text = "0.00";
                    lblands.Text = "0.00";
                }
                else
                {
                    OddsImpl oddservice = new OddsImpl();
                    var r        = oddservice.GetList(cbox.SelectedValue.ToTryInt());
                    var oddsList = r.Body.Where(x => x.OrderType == (int)OrderType.波色).ToList();
                    if (oddsList != null && oddsList.Count > 0)
                    {
                        oddsList.ForEach(x =>
                        {
                            switch (x.ChildType)
                            {
                                #region 红波
                            case (int)ChildType.红波:
                                lbhb.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.红单:
                                lbhd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.红双:
                                lbhs.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.红大:
                                lbhda.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.红小:
                                lbhx.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.红大单:
                                lbhdd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.红大双:
                                lbhds.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.红小单:
                                lbhxd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.红小双:
                                lbhxs.Text = x.PL.ToString();
                                break;

                                #endregion

                                #region 绿波
                            case (int)ChildType.绿波:
                                lblb.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.绿单:
                                lbld.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.绿双:
                                lbls.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.绿大:
                                lblda.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.绿小:
                                lblx.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.绿大单:
                                lbldd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.绿大双:
                                lblds.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.绿小单:
                                lblxd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.绿小双:
                                lblxs.Text = x.PL.ToString();
                                break;

                                #endregion

                                #region 蓝波
                            case (int)ChildType.蓝波:
                                lblanb.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.蓝单:
                                lbland.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.蓝双:
                                lblans.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.蓝大:
                                lblanda.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.蓝小:
                                lblanx.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.蓝大单:
                                lblandd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.蓝大双:
                                lblands.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.蓝小单:
                                lblanxd.Text = x.PL.ToString();
                                break;

                            case (int)ChildType.蓝小双:
                                lblanxs.Text = x.PL.ToString();
                                break;

                                #endregion

                                //#region 特大单双

                                //case (int)ChildType.特单:
                                //    txttd.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.特双:
                                //    txtts.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.特大:
                                //    txttda.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.特小:
                                //    txttx.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.特大单:
                                //    txttdd.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.特大双:
                                //    txttds.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.特小单:
                                //    txttxd.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.特小双:
                                //    txttxs.Text = x.Value.ToString();
                                //    break;

                                //#endregion

                                //#region  合大小单双

                                //case (int)ChildType.合单:
                                //    txthed.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.合双:
                                //    txthes.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.合大:
                                //    txtheda.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.合小:
                                //    txthex.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.合大单:
                                //    txthedd.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.合大双:
                                //    txtheds.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.合小单:
                                //    txthexd.Text = x.Value.ToString();
                                //    break;
                                //case (int)ChildType.合小双:
                                //    txthexs.Text = x.Value.ToString();
                                //    break;

                                //    #endregion
                            }
                        });
                        Common.CustomerId = cbox.SelectedValue.ToTryInt();
                    }
                    else
                    {
                        lbhb.Text  = "0.00";
                        lbhd.Text  = "0.00";
                        lbhs.Text  = "0.00";
                        lbhda.Text = "0.00";
                        lbhx.Text  = "0.00";
                        lbhxd.Text = "0.00";
                        lbhxs.Text = "0.00";
                        lbhdd.Text = "0.00";
                        lbhds.Text = "0.00";

                        lblb.Text  = "0.00";
                        lbld.Text  = "0.00";
                        lbls.Text  = "0.00";
                        lblda.Text = "0.00";
                        lblx.Text  = "0.00";
                        lblxd.Text = "0.00";
                        lblxs.Text = "0.00";
                        lbldd.Text = "0.00";
                        lblds.Text = "0.00";

                        lblanb.Text  = "0.00";
                        lbland.Text  = "0.00";
                        lblans.Text  = "0.00";
                        lblanda.Text = "0.00";
                        lblanx.Text  = "0.00";
                        lblanxd.Text = "0.00";
                        lblanxs.Text = "0.00";
                        lblandd.Text = "0.00";
                        lblands.Text = "0.00";
                    }
                }
            });
        }