Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("Employeerid,Name,Email,Contact,recuritment,No_ofPost")] Employeer employeer)
        {
            if (id != employeer.Employeerid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(employeer);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmployeerExists(employeer.Employeerid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(employeer));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit(int id, [Bind("Queryid,Name,Email,Contact,Message")] query query)
        {
            if (id != query.Queryid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(query);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!queryExists(query.Queryid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(query));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Edit(int id, [Bind("Customerid,Name,Email,Contact,Qualification")] Customer customer)
        {
            if (id != customer.Customerid)
            {
                return(NotFound());
            }

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