Exemple #1
0
        public ActionResult ProductAuthenticationInfo(long Id = 0L)
        {
            IProductAuthenticationService productService = ServiceHelper.Create <IProductAuthenticationService>();
            ProductAuthentication         productInfo    = new ProductAuthentication();
            string procode = "";
            string proimg  = "";
            string comname = "";
            string comatt  = "";

            if (Id != 0)
            {
                productInfo = productService.GetProductAuthenticationId(Id);
                if (productInfo != null)
                {
                    procode = productInfo.ProductCode;
                    proimg  = productInfo.ProductIMG;
                    comname = productInfo.ComName;
                    comatt  = productInfo.ComAttachment;
                }
            }
            ViewBag.ProductCode = procode;
            ViewBag.ProductIMG  = proimg;
            ViewBag.ComName     = comname;
            ViewBag.ComAtt      = comatt;
            return(View(productInfo));
        }
Exemple #2
0
        public JsonResult NoSuccess(long Id)
        {
            IProductAuthenticationService productService = ServiceHelper.Create <IProductAuthenticationService>();
            ProductAuthentication         productInfo    = ServiceHelper.Create <IProductAuthenticationService>().GetProductAuthenticationId(Id);

            productInfo.AuthStatus = 2;
            ServiceHelper.Create <IProductAuthenticationService>().UpdateProductAuthentication(productInfo);
            ProductInfo productInfos = ServiceHelper.Create <IProductService>().GetProduct(productInfo.ProductId);

            productInfos.AuthStatus = productInfo.AuthStatus;
            ServiceHelper.Create <IProductService>().UpdateProduct(productInfos);
            return(Json(new { Successful = true }));
        }
Exemple #3
0
        public JsonResult Success(long Id, string AuthStatus)
        {
            IProductAuthenticationService productService = ServiceHelper.Create <IProductAuthenticationService>();
            ProductAuthentication         productInfo    = ServiceHelper.Create <IProductAuthenticationService>().GetProductAuthenticationId(Id);

            productInfo.AuthStatus = int.Parse(AuthStatus);
            productInfo.AuthTime   = DateTime.Now;
            ServiceHelper.Create <IProductAuthenticationService>().UpdateProductAuthentication(productInfo);
            ProductInfo productInfos = ServiceHelper.Create <IProductService>().GetProduct(productInfo.ProductId);

            productInfos.AuthStatus = productInfo.AuthStatus;
            ServiceHelper.Create <IProductService>().UpdateProduct(productInfos);
            return(Json(new { Successful = true }));
        }
Exemple #4
0
        public JsonResult ListProductAuthentication(int page, int rows, string comname, string productCode, string AuthStatus)
        {
            IProductAuthenticationService IPAS = ServiceHelper.Create <IProductAuthenticationService>();
            ProductAuthenticationQuery    PAQ  = new ProductAuthenticationQuery()
            {
                ComName     = comname,
                ProductCode = productCode,
                AuthStatus  = AuthStatus,
                PageNo      = page,
                PageSize    = rows,
            };
            PageModel <ProductAuthentication>   pm     = IPAS.GetProductAuthenticationList(PAQ);
            IEnumerable <ProductAuthentication> models =
                from item in pm.Models.ToArray()
                select new ProductAuthentication()
            {
                Id              = item.Id,
                ManageId        = item.ManageId,
                ProductCode     = item.ProductCode,
                ProductIMG      = item.ProductIMG,
                ProductDesc     = item.ProductDesc,
                ProductAuthDate = item.ProductAuthDate,
                AuthStatus      = item.AuthStatus,
                AuthAuthor      = item.AuthAuthor,
                AuthTime        = item.AuthTime,
                AuthDesc        = item.AuthDesc,
                ComName         = item.ComName,
                ComAttachment   = item.ComAttachment
            };
            DataGridModel <ProductAuthentication> dataGridModel = new DataGridModel <ProductAuthentication>()
            {
                rows  = models,
                total = pm.Total
            };

            return(Json(dataGridModel));
        }