public async Task <ActionResult> DeleteConfirmed(int id)
        {
            tbl_Dispatch_Details tbl_Dispatch_Details = await db.tbl_Dispatch_Details.FindAsync(id);

            db.tbl_Dispatch_Details.Remove(tbl_Dispatch_Details);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "Dispatch_Details_ID,Dispatch_Details")] tbl_Dispatch_Details tbl_Dispatch_Details)
        {
            if (ModelState.IsValid)
            {
                db.Entry(tbl_Dispatch_Details).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Details", new { id = tbl_Dispatch_Details.Dispatch_Details_ID }));
            }
            return(View(tbl_Dispatch_Details));
        }
        public async Task <ActionResult> Create([Bind(Include = "Dispatch_Details_ID,Dispatch_Details")] tbl_Dispatch_Details tbl_Dispatch_Details)
        {
            if (ModelState.IsValid)
            {
                db.tbl_Dispatch_Details.Add(tbl_Dispatch_Details);
                await db.SaveChangesAsync();

                return(RedirectToAction("Details", new { id = tbl_Dispatch_Details.Dispatch_Details_ID }));
            }

            return(View(tbl_Dispatch_Details));
        }
        // GET: DispatchDetailsManagement/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_Dispatch_Details tbl_Dispatch_Details = await db.tbl_Dispatch_Details.FindAsync(id);

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