Ejemplo n.º 1
0
        public ActionResult ListeleriDoldur()
        {
            RaporVM model = new RaporVM()
            {
                Kamyonlar  = _db.tbl_Kamyonlar.ToList(),
                Musteriler = _db.tbl_Musteri.ToList(),
                Soforler   = _db.tbl_Soforler.ToList(),
            };

            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult Kaydet(RaporVM model, tbl_NakliyeRapor rapor)
        {
            rapor.MusteriID  = model.MusteriID;
            rapor.KamyonID   = model.KamyonID;
            rapor.Tarih      = model.Tarih;
            rapor.Miktar     = model.Miktar;
            rapor.SoforID    = model.SoforID;
            rapor.GidilenYer = model.GidilenYer;
            _db.tbl_NakliyeRapor.Add(rapor);
            int satir = 0;

            satir = _db.SaveChanges();
            if (satir > 0)
            {
                TempData["msg"] = "<script>alert('Başarıyla kaydedildi');</script>";
                return(RedirectToAction("ListeleriDoldur"));
            }
            else
            {
                TempData["msg"] = "<script>alert('Lutfen Bilgileri kontrol edin');</script>";
                return(View());
            }
        }
Ejemplo n.º 3
0
 public ActionResult ListeleriDoldur(RaporVM model)
 {
     return(View());
 }