public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Picture,Status")] CategoriesManagement categoriesManagement)
        {
            if (id != categoriesManagement.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(categoriesManagement);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CategoriesManagementExists(categoriesManagement.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(categoriesManagement));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,UserName,DisplayName,Password,Email,Status,Role,ProfilePicture,RegisteredData")] UsersManagement usersManagement)
        {
            if (id != usersManagement.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(usersManagement);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UsersManagementExists(usersManagement.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(usersManagement));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,CategorieId,Name,Description,Quantity,CostPrice,SalePrice,MainImage,ItemCode,MainColor,Status")] ItemManagement itemManagement)
        {
            if (id != itemManagement.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(itemManagement);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ItemManagementExists(itemManagement.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(itemManagement));
        }