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; }
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; }