예제 #1
0
        public ActionResult EditBucket(AsignacionBuckets buckets)
        {
            int         result = 0;
            ManagerUser manage = new ManagerUser();

            try
            {
                try
                {
                    manage.ActualizarBuckets(buckets);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    // Provide for exceptions.
                }

                if (result > 0)
                {
                    return(Json(data: true));
                }
                else
                {
                    return(Json(data: false));
                }

                //return View("Edit");
            }
            catch (Exception)
            {
                throw;
            }
        }
        public ActionResult Edit(AsignacionBuckets asignacionbuckets)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    ManagerUser mang = new ManagerUser();
                    asignacionbuckets.Respuesta = mang.ActualizarBuckets(asignacionbuckets);

                    //db.Entry(asignacionbuckets).State = EntityState.Modified;
                    //db.SaveChanges();
                    //return RedirectToAction("Index");
                }
            }
            catch
            {
                asignacionbuckets.Respuesta = false;
            }
            return(View(asignacionbuckets));
        }