Ejemplo n.º 1
0
        public ActionResult GetReport(DateTime startdate, DateTime enddate, string productcode, string Type)
        {
            if (Type == "ProductAll")
            {
                var result = db.prSalesReport(startdate, enddate, productcode).ToList();
                return(Json(result, JsonRequestBehavior.AllowGet));
            }
            else if (Type == "ProductDetails")
            {
                var result = db.prSalesReportDetails(startdate, enddate, productcode).ToList();
                return(Json(result, JsonRequestBehavior.AllowGet));
            }

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