Ejemplo n.º 1
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));
        }