Exemplo n.º 1
0
 public _Call(string date, string time_of_start, int duration_of_call)
 {
     this.id_of_record     = RecordCounter;
     this.date             = date;
     this.time_of_start    = time_of_start;
     this.duration_of_call = duration_of_call;
     this.next_call        = null;
     RecordCounter++;
 }
Exemplo n.º 2
0
 public void AddNewCall(_Call NewCall)
 {
     if (null == this.head_call)
     {
         this.head_call = NewCall;
         this.end_call  = NewCall;
     }
     else
     {
         this.end_call.NextCall = NewCall;
         this.end_call          = NewCall;
         this.end_call.NextCall = null;
     }
 }
Exemplo n.º 3
0
        public _Call GetCallRecord(int RecordID)
        {
            _Call tempCall = this.head_call;

            while (tempCall != null)
            {
                if (tempCall.RecordID == RecordID)
                {
                    break;
                }
                tempCall = tempCall.NextCall;
            }
            return(tempCall);
        }
Exemplo n.º 4
0
        public void RemoveCallFromHistory(int RecordID)
        {
            _Call tempCall     = this.head_call;
            _Call prevTempCall = this.head_call;

            while (tempCall != null)
            {
                if (tempCall.RecordID == RecordID)
                {
                    prevTempCall.NextCall = tempCall.NextCall;
                    tempCall.NextCall     = null;
                    break;
                }
                prevTempCall = tempCall;
                tempCall     = tempCall.NextCall;
            }
        }
Exemplo n.º 5
0
 public _CallHistory()
 {
     this.head_call = null;
     this.end_call  = null;
 }