public async Task <IActionResult> Edit(int id, [Bind("ZlocationId,location,report,active,credstatus,temp")] Zlocation zlocation)
        {
            if (id != zlocation.ZlocationId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(zlocation);
                    TempData["Alert"] = String.Format("Saved Changes to Location: {0}", zlocation.location);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ZlocationExists(zlocation.ZlocationId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(zlocation));
        }
        public async Task <IActionResult> Create([Bind("ZlocationId,location,report,active,credstatus,temp")] Zlocation zlocation)
        {
            if (ModelState.IsValid)
            {
                _context.Add(zlocation);
                TempData["Alert"] = String.Format("Added Location: {0}", zlocation.location);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(zlocation));
        }