예제 #1
0
 public frmGoodsMgr()
 {
     InitializeComponent();
     ws = new WSGoods();
     dataGoodsInfo.AutoGenerateColumns = false;
     paging1.OnFirstPage += ChangePage;
     paging1.OnJumpToPage += ChangePage;
     paging1.OnLastPage += ChangePage;
     paging1.OnPageDown += ChangePage;
     paging1.OnPageUp += ChangePage;
     paging1.OnReload += ChangePage;
 }
예제 #2
0
 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;
 }
예제 #3
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";
 }
예제 #4
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     ws.Dispose();
     ws = null;
     this.Close();
 }
예제 #5
0
        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;
        }
예제 #6
0
        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();
        }