예제 #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            HomeDelivery_Tbl homedelivery_tbl = await db.HomeDelivery_Tbl.FindAsync(id);

            db.HomeDelivery_Tbl.Remove(homedelivery_tbl);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
예제 #2
0
        public async Task <ActionResult> Edit([Bind(Include = "homdelid,homdellocation,homdelcity,createdby,createddate,updatedby,updateddate")] HomeDelivery_Tbl homedelivery_tbl)
        {
            if (ModelState.IsValid)
            {
                db.Entry(homedelivery_tbl).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(homedelivery_tbl));
        }
예제 #3
0
        // GET: /HomeDelivery/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HomeDelivery_Tbl homedelivery_tbl = await db.HomeDelivery_Tbl.FindAsync(id);

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