public ActionResult UpdateNewToPending(ClientsIndexModel model) { using (var db = new ccEntities()) { try { var clients = db.UpdateClientApptovalStatus((int)ApprovalStatusEnum.New, (int)ApprovalStatusEnum.Pending, this.Permissions.User.Id).ToList(); model.Messages.Add(string.Format("{0} records updated", clients.Count())); model.UpdateClientsCount(db); } catch (System.Data.UpdateException ex) { model.Exception = ex; } return(Index(model)); } }