コード例 #1
1
        public void Print(ParkingTicket ticket, object args = null)
        {
            var r = new ViewAsPdf("Rpt01_ParkingTicketIn", ticket);

              r.PageSize = Rotativa.Options.Size.A6;
              r.PageOrientation = Rotativa.Options.Orientation.Portrait;

              var fileName = ticket.Id + ".pdf";
              var filePath = HttpContext.Current.Server.MapPath("~/App_Data/" + fileName);

              var bytes = r.BuildPdf((ControllerContext)args);
              System.IO.File.WriteAllBytes(filePath, bytes);
        }
コード例 #2
1
        public void Print(ParkingTicket ticket, object args = null)
        {
            //throw new NotImplementedException();

              var r = new ViewAsPdf("RPT_01_PakingTicket_In", ticket);
              r.PageSize = Rotativa.Options.Size.A6;
              r.PageOrientation = Rotativa.Options.Orientation.Portrait;

              var fName = ticket.ID + ".PDF";
              var fPath = HttpContext.Current. Server.MapPath("~/App_Data/" + fName);

              var bytes = r.BuildPdf((ControllerContext) args);
              System.IO.File.WriteAllBytes(fPath, bytes);
        }
コード例 #3
0
 private void displayTicket(ParkingTicket  t)
 {
     output.WriteLine("TICKET:");
     output.WriteLine($"  Id:      {t.Id}");
     output.WriteLine($"  Gate:    {t.GateId}");
     output.WriteLine($"  Plate:   {t.PlateNumber}");
     output.WriteLine($"  Date In: {t.DateIn:s}");
 }
コード例 #4
0
 public void Print(ParkingTicket ticket, object args = null)
 {
     HasPrinted = true;
 }
コード例 #5
0
 private void printParkingTicket(ParkingTicket t)
 {
 }
コード例 #6
0
 public void Print(ParkingTicket ticket, object args = null)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
 public void Print(ParkingTicket ticket)
 {
     HasPrinted = true;
 }
コード例 #8
0
            private void displayTicket(ParkingTicket t)
            {
                output.WriteLine("TICKET");

                output.WriteLine($"ID   :   {t.ID}");
                output.WriteLine($"Gate :   {t.GateID}");
                output.WriteLine($"Plate:   {t.PlateNo}");
                output.WriteLine($"Date In: {t.DateIn}");
            }