Ejemplo n.º 1
0
        public ActionResult InvitupdateA(int idI, FormCollection collection)
        {
            //try
            //{

            foreach (var item in invtService.ForUpdateInv(idI))
            {
                item.Status = Domain.Enums.InvitationStatus.Accepted;
                invtService.Update(item);
            }
            try
            {
                invtService.Commit();
            }
            catch (System.Data.Entity.Validation.DbEntityValidationException ex)
            {
                foreach (var entityValidationErrors in ex.EntityValidationErrors)
                {
                    foreach (var validationError in entityValidationErrors.ValidationErrors)
                    {
                        Response.Write("Property: " + validationError.PropertyName + " Error: " + validationError.ErrorMessage);
                    }
                }
            }


            return(Redirect(ControllerContext.HttpContext.Request.UrlReferrer.ToString()));
        }