Esempio n. 1
0
        public override void RecordCall(TypeOfCall callType, uint nMinutes)
        {
            switch (callType)
            {
            case TypeOfCall.CallToLandline:
                balance += (0.02M * nMinutes);
                break;

            case TypeOfCall.CallToCellPhone:
                uint highCostMinutes, lowCostMinutes;
                uint highCostMinutesToGo =
                    (highCostMinutesUsed < 60) ? 60 - highCostMinutesUsed : 0;
                if (nMinutes > highCostMinutesToGo)
                {
                    highCostMinutes = highCostMinutesToGo;
                    lowCostMinutes  = nMinutes - highCostMinutes;
                }
                else
                {
                    highCostMinutes = nMinutes;
                    lowCostMinutes  = 0;
                }
                highCostMinutesUsed += highCostMinutes;
                balance             += (0.50M * highCostMinutes + 0.20M *
                                        lowCostMinutes);
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
 public RecordOfReport(TypeOfCall typeOfCall, int number, DateTime date, DateTime time, int amount)
 {
     TypeOfCall = typeOfCall;
     Number     = number;
     Date       = date;
     Time       = time;
     Amount     = amount;
 }
Esempio n. 3
0
 public ClockedRemoteCall(uint Tick, TypeOfCall Type, WeakRef Node, String Name, MDRemoteMode Mode, int SenderPeerId,
                          params object[] Parameters)
 {
     this.Tick         = Tick;
     this.Type         = Type;
     this.Node         = Node;
     this.Name         = Name;
     this.Mode         = Mode;
     this.Parameters   = Parameters;
     this.SenderPeerId = SenderPeerId;
 }
Esempio n. 4
0
 public virtual void RecordCall(TypeOfCall callType, uint nMinutes)
 {
     switch (callType)
      {
     case TypeOfCall.CallToLandline:
        balance += (0.02M * nMinutes);
        break;
     case TypeOfCall.CallToCellPhone:
        balance += (0.30M * nMinutes);
        break;
     default:
        break;
      }
 }
Esempio n. 5
0
        public override void RecordCall(TypeOfCall callType, uint nMinutes)
        {
            switch (callType)
            {
            case TypeOfCall.CallToLandline:
                balance += (0.02M * nMinutes);
                break;

            case TypeOfCall.CallToCellPhone:
                balance += (0.30M * nMinutes);
                break;

            default:
                break;
            }
        }
Esempio n. 6
0
 public abstract void RecordCall(TypeOfCall callType, uint nMinutes);
Esempio n. 7
0
 public override void RecordCall(TypeOfCall callType, uint nMinutes)
 {
     switch (callType)
      {
     case TypeOfCall.CallToLandline:
        balance += (0.02M * nMinutes);
        break;
     case TypeOfCall.CallToCellPhone:
      uint highCostMinutes, lowCostMinutes;
      uint highCostMinutesToGo =
     (highCostMinutesUsed < 60) ? 60 - highCostMinutesUsed : 0;
      if (nMinutes > highCostMinutesToGo)
      {
     highCostMinutes = highCostMinutesToGo;
     lowCostMinutes = nMinutes - highCostMinutes;
      }
      else
      {
     highCostMinutes = nMinutes;
     lowCostMinutes = 0;
      }
      highCostMinutesUsed += highCostMinutes;
      balance += (0.50M * highCostMinutes + 0.20M *
     lowCostMinutes);
      break;
     default:
        break;
      }
 }
Esempio n. 8
0
 public abstract void RecordCall(TypeOfCall callType, uint nMinutes);