public async Task <IActionResult> Edit(int id, [Bind("Id,Code,DescriptionRU,DescriptionKK,DescriptionEN")] ZSubType zSubType)
        {
            if (id != zSubType.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(zSubType);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ZSubTypeExists(zSubType.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(zSubType));
        }
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            ZSubType zSubType = await db.ZSubTypes.FindAsync(id);

            db.ZSubTypes.Remove(zSubType);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <IActionResult> Create([Bind("Id,Code,DescriptionRU,DescriptionKK,DescriptionEN")] ZSubType zSubType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(zSubType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(zSubType));
        }
        public async Task <ActionResult> Edit([Bind(Include = "Id,Code,Description")] ZSubType zSubType)
        {
            if (ModelState.IsValid)
            {
                db.Entry(zSubType).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(zSubType));
        }
        public async Task <ActionResult> Create([Bind(Include = "Id,Code,Description")] ZSubType zSubType)
        {
            if (ModelState.IsValid)
            {
                db.ZSubTypes.Add(zSubType);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(zSubType));
        }
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ZSubType zSubType = await db.ZSubTypes.FindAsync(id);

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