Exemplo n.º 1
0
        public ActionResult PrintPartialViewToPdf(string id)

        {
            using (IT_ASSET_MANAGEMENTEntities db = new IT_ASSET_MANAGEMENTEntities())
            {
                View_Req_PDJCOST01_Trace customer = db.View_Req_PDJCOST01_Trace.FirstOrDefault(c => c.Req_PDJ01_CODE == id);

                var report = new PartialViewAsPdf("~/Views/tbl_Req_PDJCOST01/Details_Print.cshtml", customer);

                return(report);
            }
        }
Exemplo n.º 2
0
        public ActionResult Details_Print(string id)

        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            View_Req_PDJCOST01_Trace req_PDJCOST01_Trace = db.View_Req_PDJCOST01_Trace.Find(id);

            if (req_PDJCOST01_Trace == null)
            {
                return(HttpNotFound());
            }
            return(View(req_PDJCOST01_Trace));
        }