Exemple #1
0
        //Constructor
        public Intervention()
        {
            this.resourceList       = new List <Resource>();
            this.interventionNumber = ++lastIntervention;
            this.timeOfCall         = DateTime.Now;
            this.additionalInfo     = new InterventionAdditionalInfo[10];
            this.abc                  = new ABC(this);
            this.isConcludedBool      = false;
            this.firstTeamArrivalTime = DateTime.MinValue;
            this.callID               = -1;

            activeInterventionList.Add(this);
            ClassModifiedNotification(typeof(Intervention));

            if (Operation.currentOperation != null)
            {
                this.operationID = Operation.currentOperation.getID();
            }
            this.interventionID = StaticDBConnection.NonQueryDatabaseWithID("INSERT INTO [Interventions] (Operation_ID, Intervention_Number, Time_Of_Call) VALUES (" + operationID + ", " + interventionNumber + ", '" + StaticDBConnection.DateTimeSQLite(timeOfCall) + "')");
        }
Exemple #2
0
 //Set abc
 public void setABC(ABC abc)
 {
     this.abc = abc;
     StaticDBConnection.NonQueryDatabase("UPDATE [ABCs] SET Intervention_ID=" + interventionID + " WHERE ABC_ID=" + abc.getID() + ";");
 }