Ejemplo n.º 1
0
        public ActionResult PersonelKayitet(Personel form)
        {
            NovapmEntities db = new NovapmEntities();

            db.Personel.Add(form);
            db.SaveChanges();
            return(new JsonResult()
            {
                Data = true,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Ejemplo n.º 2
0
        public ActionResult Kydt(Firma form)
        {
            NovapmEntities db = new NovapmEntities();

            db.Firma.Add(form);
            db.SaveChanges();
            return(new JsonResult()
            {
                Data = true,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Ejemplo n.º 3
0
        public ActionResult Personelsil(int perid)
        {
            NovapmEntities db  = new NovapmEntities();
            var            sil = db.Personel.Where(w => w.ID == perid).FirstOrDefault();

            db.Personel.Remove(sil);
            db.SaveChanges();
            return(new JsonResult()
            {
                Data = true,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Ejemplo n.º 4
0
        public ActionResult UPDATE(Firma model)
        {
            NovapmEntities db = new NovapmEntities();

            if (ModelState.IsValid)
            {
                db.Entry(model).State = EntityState.Modified;
                db.SaveChanges();
                return(new JsonResult()
                {
                    Data = true,
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet
                });
            }
            return(new JsonResult()
            {
                Data = true,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }