private void frmVipConsumption_Load(object sender, EventArgs e) { WSGoods wsg = new WSGoods(); int a = 1, b; goodsInfo = wsg.Search(new BLLGoods.Goods() { Id = -1, Name = "" }, ref a, 100000, out b); if (goodsInfo == null) return; cbPro.DataSource = goodsInfo; cbPro.DisplayMember = "Name"; cbPro.ValueMember = "Id"; cbPro.SelectedIndexChanged += (s, ee) => { numMach.Value = (decimal)(cbPro.SelectedItem as BLLGoods.Goods).Price; }; cbPro.SelectedIndex = 0; numMach.Value = (decimal)goodsInfo[0].Price; }
private void frmVipConsumptionMgr_Load(object sender, EventArgs e) { dataBgn.Value = DateTime.Now.AddDays(-1); List<User> u = new List<User>(); u.Add(new User() { Id = 0, Name = "全部" }); u.AddRange(wsu.List()); cbOpter.DataSource = u; cbOpter.ValueMember = "Id"; cbOpter.DisplayMember = "Name"; cbOpter.SelectedIndex = 0; WSGoods wsg = new WSGoods(); List<BLLGoods.Goods> g = new List<BLLGoods.Goods>(); g.Add(new BLLGoods.Goods() { Id = 0, Name = "全部" }); int a=1,b; g.AddRange(wsg.Search(new BLLGoods.Goods(){Name=""},ref a,10000000,out b)); cbProjects.DataSource = g; cbProjects.ValueMember = "Id"; cbProjects.DisplayMember = "Name"; cbProjects.SelectedIndex = 0; }
private void frmReceiveMgr_Load(object sender, EventArgs e) { WSGoods wsg = new WSGoods(); int a = 1, b; goodsInfo = wsg.Search(new BLLGoods.Goods() { Id = -1, Name = "" }, ref a, 100000, out b); List<UI.BLLGoods.Goods> pros = new List<BLLGoods.Goods>(); pros.AddRange(goodsInfo); pros.Insert(0, new BLLGoods.Goods() { Id = -1, Name = "无" }); cbPro.DataSource = pros; cbPro.DisplayMember = "Name"; cbPro.ValueMember = "Id"; }
private void frmIntegralConsumption_Load(object sender, EventArgs e) { WSGoods wsg = new WSGoods(); int a1 = 1, b1; goodsInfo = wsg.Search(new BLLGoods.Goods() { Id = -1, Name = "" }, ref a1, 100000, out b1); List<UI.BLLGoods.Goods> pros = new List<BLLGoods.Goods>(); pros.AddRange(goodsInfo); pros.Insert(0, new BLLGoods.Goods() { Id = -1, Name = "无" }); cbPro.DataSource = pros; cbPro.DisplayMember = "Name"; cbPro.ValueMember = "Id"; cbPro.SelectedValueChanged += cbPro_SelectedValueChanged; if (mid < 0) return; int a = 1, b; var result = wsm.Search(new Member() { Id = mid, Name = "", Mobilephone = "", CoachId = -1, CardType = "" }, true, ref a, 1, out b); if (result != null) SetValue(result[0]); else ClearValue(); }