コード例 #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            SurecHareket surecHareket = await db.SurecHarekets.FindAsync(id);

            db.SurecHarekets.Remove(surecHareket);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public async Task <ActionResult> Edit([Bind(Include = "SurecHareketId,ProjeId,GelisTarih,GidisTarih,UserId")] SurecHareket surecHareket)
        {
            if (ModelState.IsValid)
            {
                db.Entry(surecHareket).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(surecHareket));
        }
コード例 #3
0
        public async Task <ActionResult> Create([Bind(Include = "SurecHareketId,ProjeId,GelisTarih,GidisTarih,UserId")] SurecHareket surecHareket)
        {
            if (ModelState.IsValid)
            {
                db.SurecHarekets.Add(surecHareket);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(surecHareket));
        }
コード例 #4
0
        // GET: SurecHarekets/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SurecHareket surecHareket = await db.SurecHarekets.FindAsync(id);

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