public async Task <IActionResult> Edit(string id, [Bind("DimSubTypeId,DimQlty")] DimQltySubMst dimQltySubMst)
        {
            if (id != dimQltySubMst.DimSubTypeId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(dimQltySubMst);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DimQltySubMstExists(dimQltySubMst.DimSubTypeId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(dimQltySubMst));
        }
        public ActionResult DeleteConfirmed(string id)
        {
            DimQltySubMst dimQltySubMst = db.DimQltySubMsts.Find(id);

            db.DimQltySubMsts.Remove(dimQltySubMst);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "DimSubTypeId,DimQlty,DimSubThumbnail")] DimQltySubMst dimQltySubMst)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dimQltySubMst).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dimQltySubMst));
 }
        public async Task <IActionResult> Create([Bind("DimSubTypeId,DimQlty")] DimQltySubMst dimQltySubMst)
        {
            if (ModelState.IsValid)
            {
                _context.Add(dimQltySubMst);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(dimQltySubMst));
        }
        public ActionResult Create([Bind(Include = "DimSubTypeId, DimQlty,DimSubThumbnail")] DimQltySubMst dimQltySubMst)
        {
            dimQltySubMst.DimSubTypeId = "dims" + Guid.NewGuid().ToString().GetHashCode().ToString("x");
            if (ModelState.IsValid)
            {
                db.DimQltySubMsts.Add(dimQltySubMst);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dimQltySubMst));
        }
        // GET: Admin/DimQltySubMsts/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DimQltySubMst dimQltySubMst = db.DimQltySubMsts.Find(id);

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