Esempio n. 1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            PersonelTable personeltable = await db.PersonelTable.FindAsync(id);

            db.PersonelTable.Remove(personeltable);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public async Task <ActionResult> Edit([Bind(Include = "Personel_id,Personel_adi,Personel_soyadi,Personel_departman")] PersonelTable personeltable)
        {
            if (ModelState.IsValid)
            {
                db.Entry(personeltable).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(personeltable));
        }
Esempio n. 3
0
        public async Task <ActionResult> Create([Bind(Include = "Personel_id,Personel_adi,Personel_soyadi,Personel_departman")] PersonelTable personeltable)
        {
            if (ModelState.IsValid)
            {
                db.PersonelTable.Add(personeltable);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(personeltable));
        }
Esempio n. 4
0
        // GET: /Personel/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PersonelTable personeltable = await db.PersonelTable.FindAsync(id);

            if (personeltable == null)
            {
                return(HttpNotFound());
            }
            return(View(personeltable));
        }