private void SetViewConfirmBinding(SaleBook saleBook)
        {
            BindingHelper1 h1 = new BindingHelper1() { Id = ViewConfirmStateEnum.Default, Name = "未确认" };
            BindingHelper1 h2 = new BindingHelper1() { Id = ViewConfirmStateEnum.ViewConfirmed, Name = "现场确认" };

            //var selectList = new SelectList(new SelectListItem[] { enumListitem1, enumListitem2 });
            this.ViewData["ViewConfirmEnum"] = new SelectList(new BindingHelper1[] { h1, h2 }, "Id", "Name"); // selectList;

            var salemans = db.Salesmans.ToList();
            var selectList = new SelectList(salemans, "SalesmanId", "Name", saleBook.SalesmanId);
            this.ViewData["SalesmanIdEnum"] = selectList;
        }
        private void SetBindConfirmBinding(SaleBook saleBook)
        {
            BindingHelper2 h1 = new BindingHelper2() { Id = BuyConfirmStateEnum.Default, Name = "未确认" };
            BindingHelper2 h2 = new BindingHelper2() { Id = BuyConfirmStateEnum.BuyConfirmed, Name = "现场确认" };

            this.ViewData["BuyConfirmEnum"] = new SelectList(new BindingHelper2[] { h1, h2 }, "Id", "Name"); // selectList;

            var salemans = db.Salesmans.ToList();
            var selectList = new SelectList(salemans, "SalesmanId", "Name", saleBook.SalesmanId);
            this.ViewData["SalesmanIdEnum"] = selectList;
        }
 public SaleBookViewModel(SaleBook saleBook)
 {
     this.m_saleBook = saleBook; 
 }