Example #1
0
        public ActionResult Edit(int productid)
        {
            var model = new AuditEditModel();

            model.Roles = base.ROLENAME;
            var productinfo = ProductBLL.Instance.Product_Get(productid);

            if (productinfo == null)
            {
                return(new EmptyResult());
            }

            var category = new List <QualificationInfo>();
            var audit    = ProductBLL.Instance.ProductAudit_Get(productid).FirstOrDefault(t => t.Type == (short)JXProduct.Component.Enums.Product.AuditType.商品资质) ?? new ProductAuditInfo()
            {
                Type = (short)JXProduct.Component.Enums.Product.AuditType.商品资质
            };

            model.audit   = audit;
            model.product = productinfo;

            int recordCount = 0;

            model.cfList       = ClassificationBLL.Instance.Classification_GetList(1, 0, "", "", out recordCount);
            model.productCF    = ProductClassificationBLL.Instance.ProductClassification_GetList(productid);
            model.instructions = ProductBLL.Instance.Product_GetInstructions(productid);
            model.ProductItems = QualificationBLL.Instance.Qualification_GetProductList(productid);
            return(View(model));
        }
Example #2
0
        public ActionResult Preview(int productid)
        {
            var model       = new AuditEditModel();
            var category    = new List <QualificationInfo>();
            int recordCount = 0;

            model.product = ProductBLL.Instance.Product_Get(productid);
            model.audit   = ProductBLL.Instance.ProductAudit_Get(productid).FirstOrDefault(t => t.Type == (short)JXProduct.Component.Enums.Product.AuditType.商品资质) ?? new ProductAuditInfo();

            model.cfList       = ClassificationBLL.Instance.Classification_GetList(1, 0, "", "", out recordCount);
            model.productCF    = ProductClassificationBLL.Instance.ProductClassification_GetList(productid);
            model.instructions = ProductBLL.Instance.Product_GetInstructions(productid);


            model.Category = QualificationBLL.Instance.Qualification_GetCategory();
            var mitems = QualificationBLL.Instance.Qualification_GetManufacturerList(model.product.ManufacturerID, 0, 0);

            mitems.AddRange(QualificationBLL.Instance.Qualification_GetManufacturerList(model.product.ManufacturerID, 1, 0));
            model.ManufacturerItems = mitems;

            model.ProductItems = QualificationBLL.Instance.Qualification_GetProductList(productid);

            return(View(model));
        }