public void LoadUserControl(ShadowBaseDisplayView view)
        {
            //Init Control
            var companys     = iCompanyService.GetPagerCompany("", 1, 100);
            var products     = iProductBaseService.GetPagerProductBase("", 1, 100);
            var productTypes = iProductTypeService.GetPagerProductType("", 1, 100);
            var productSpecs = iProductSpecService.GetPagerProductSpec("", 1, 100);

            view.cbCompany.ItemsSource       = companys;
            view.cbCompany.SelectedIndex     = -1;
            view.cbProduct.ItemsSource       = products;
            view.cbProduct.SelectedIndex     = -1;
            view.cbProductType.ItemsSource   = productTypes;
            view.cbProductType.SelectedIndex = -1;

            ViewSelf = view;


            ReaderHelper reader = new ReaderHelper();

            var list = reader.GetPortList();

            view.cbPort.ItemsSource       = list;
            view.cbPort.DisplayMemberPath = "PortId";
            view.cbPort.SelectedValuePath = "PortName";
        }
Exemple #2
0
        public void LoadUserControl(ShadowBaseEditView view)
        {
            ViewSelf = view;
            //Init Control
            var companys     = iCompanyService.GetPagerCompany("", 1, 100);
            var products     = iProductBaseService.GetPagerProductBase("", 1, 100);
            var productTypes = iProductTypeService.GetPagerProductType("", 1, 100);
            var productSpecs = iProductSpecService.GetPagerProductSpec("", 1, 100);

            view.cbCompany.ItemsSource   = companys;
            view.cbCompany.SelectedIndex = 0;
            view.cbProduct.ItemsSource   = products;
            view.cbProduct.SelectedIndex = 0;
            Model.ProductName            = products[0].ProductName;

            view.cbProductType.ItemsSource   = productTypes;
            view.cbProductType.SelectedIndex = 0;
            //view.cb.ItemsSource = companys;
            //view.cbCompany.SelectedIndex = 0;
            Model.ORCode = QRCode;
            NotifyOfPropertyChange(() => Model);
        }
Exemple #3
0
        public ActionResult GetList(int page, int rows)
        {
            var productName     = RequestHelper.RequestPost("proName", string.Empty);
            var productSpecList = productBaseService.GetPagerProductBase(productName, page, rows).Select(m => new
            {
                ProductID     = m.ProductID,
                ProductName   = m.ProductName,
                ClassID       = m.ClassID,
                ClassName     = m.ClassName,
                ProductCode   = m.ProductCode,
                ProductSpcID  = m.ProductSpcID,
                SpecName      = m.ProductSpec.SpecName,
                ProductTypeID = m.ProductTypeID,
                ProductTypeEN = m.ProductType.ProductTypeEN,
                Weight        = m.Weight,
                PinYinCode    = m.PinYinCode,
                Price         = m.Price,
                Remark        = m.Remark,
                IsLocked      = m.IsLocked,
                IsShow        = m.IsShow,
            });

            return(Json(productSpecList, JsonRequestBehavior.AllowGet));
        }