Exemplo n.º 1
0
        public static String GetZoneNote(Zone zone)
        {
            Audit audit = ServiceAudit.getlatestAuditforZone(zone.ZoneId);

            if (audit == null)
            {
                return(null);
            }
            return(audit.Note.ToString() + "/" + ServicePoint.GetAllPointsForAudit(audit).Count.ToString());
        }
Exemplo n.º 2
0
        static public int?GetZone5StarsLevel(Zone zone)
        {
            //get last audit to calculate its 5StarsLevel
            Audit currentaudit = ServiceAudit.getlatestAuditforZone(zone.ZoneId);

            if (currentaudit == (null))
            {
                return(null);
            }
            return((int?)currentaudit.FiveStarsLevel);
        }
Exemplo n.º 3
0
 static public void HandleResultats(ResultsViewModel resultvm)
 {
     resultvm.audit = ServiceAudit.getAuditdetached(resultvm.auditid);
     if (!resultvm.audit.isInProgress)
     {
         resultvm.audit.isInProgress = true;
         AddResultats(resultvm);
     }
     else
     {
         UpdateResultats(resultvm);
     }
 }
Exemplo n.º 4
0
        static async public Task updatecompletedAudit(int id)
        {
            Audit temp = ServiceAudit.getAuditdetached(id);

            temp.isInProgress     = false;
            temp.isCompleted      = true;
            temp.FiveStarsLevel   = GetAudit5StarsLevel(temp);
            temp.Note             = GetAuditNote(temp);
            temp.DateOfCompletion = DateTime.Now;
            ServiceAudit.updateAudit(temp);
            ServicePDCA.addPDCAToAudit(temp);
            await  notifySubmissiontoParticipants(temp);
        }