public static void ShowVisitaIglesia(bool response, int[] churches) { var service = new VisitaIglesiaService(); if (response) { return; } service.Delete(new Models.VisitaIglesia { UserId = Auth.user().Id }); foreach (var churchId in churches) { var visitaIglesia = new Models.VisitaIglesia { SimbahanId = churchId, UserId = Auth.user().Id, StatusId = 2 }; service.Create(visitaIglesia); } }
public static bool UpdateStatus(int churchId, int statusId) { VisitaIglesiaService service = new VisitaIglesiaService(); if (statusId == 3) { service.ResetCurrentlyHere(Auth.user().Id); } var visitaIglesia = new Models.VisitaIglesia { SimbahanId = churchId, UserId = Auth.user().Id, StatusId = statusId }; service.Update(churchId, visitaIglesia); return(true); }