Example #1
0
        // GET: Optimization/TransportMaliyet/Details/5
        public ActionResult Details(int id)
        {
            if (id < 0)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MaliyetDetail transportMaliyet = _transportMaliyetService.GetMaliyetDetailsById(id);

            if (transportMaliyet == null)
            {
                return(HttpNotFound());
            }
            return(View(transportMaliyet));
        }
Example #2
0
        public MaliyetDetail GetMaliyetDetailsById(int id)
        {
            using (var context = new TransportContext())
            {
                var kategoriler = new MaliyetDetail();

                kategoriler = context.Maliyetler
                              .Where(x => x.Id == id)
                              .Select(x => new MaliyetDetail
                {
                    Id         = x.Id,
                    DepoAdi    = x.Depo.Adi,
                    FabrikaAdi = x.Fabrika.Adi,
                    Deger      = x.Deger
                }).SingleOrDefault();

                return(kategoriler);
            }
        }