示例#1
0
        public ActionResult SatisGuncelle(tblsatislar s)
        {
            var sts = db.tblsatislar.Find(s.Id);

            sts.Urun     = s.Urun;
            sts.Personel = s.Personel;
            sts.Musteri  = s.Musteri;
            sts.Tarih    = s.Tarih;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
        public ActionResult YeniSatis(tblsatislar s)
        {
            var urn = db.tblurunler.Where(x => x.Id == s.tblurunler.Id).FirstOrDefault();
            var mus = db.tblmusteri.Where(x => x.Id == s.tblmusteri.Id).FirstOrDefault();
            var per = db.tblpersonel.Where(x => x.Id == s.tblpersonel.Id).FirstOrDefault();

            s.tblurunler  = urn;
            s.tblmusteri  = mus;
            s.tblpersonel = per;
            db.tblsatislar.Add(s);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }