Beispiel #1
0
        // GET: Invoices/Details/5
        public ActionResult Details(string id)
        {
            ReconcileData.Init();
            if (id == null)
            {
                return(BadRequest());
            }
            Invoice invoice = db.Invoices.Include(x => x.InvoiceEntries).ThenInclude(x => x.Product).FirstOrDefault(x => x.Number == int.Parse(id));

            if (invoice == null)
            {
                return(NotFound());
            }
            return(View(invoice));
        }
Beispiel #2
0
        // GET: Invoices/Details/5
        public ActionResult Details(string id)
        {
            ReconcileData.Init();
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Invoice invoice = db.Invoices.Find(id);

            if (invoice == null)
            {
                return(HttpNotFound());
            }
            return(View(invoice));
        }
 public ProductsController()
 {
     ReconcileData.Init();
 }