Beispiel #1
0
 public void SetAdditionalInfo(IUser user, ICallInfo callInfo)
 {
     callInfo.User = user;
     if (callInfo.GetCallState() == CallState.Outgoing)
     {
         callInfo.Cost        = callInfo.User.Tariff.CostPerSecond * (callInfo.GetDuration().Minutes * 60 + callInfo.GetDuration().Seconds);
         callInfo.User.Money -= callInfo.Cost;
         var money -= callInfo.
     }
     else
     {
         var cost = 0;
         callInfo.Cost = 0;
     }
 }
Beispiel #2
0
 public void SetAdditionalInfo(IUser user, ICallInfo callInfo)
 {
     if (callInfo.GetCallState() == CallState.Outgoing)
     {
         var cost  = callInfo.GetUser().GetTarif() * (callInfo.GetDuration().Minutes * 60 + callInfo.GetDuration().Seconds);
         var money = callInfo.GetUser().GetMoney() - callInfo.GetCost();
         new User(user.GetGuid(), User.GetName(), money);
         new CallInfo(callInfo.GetPhoneNumber(), callInfo.GetTarget(), callInfo.GetStarted(), callInfo.GetDuration(), user, cost);
     }
     else
     {
         var cost = 0;
         new CallInfo(callInfo.GetPhoneNumber(), callInfo.GetTarget(), callInfo.GetStarted(), callInfo.GetDuration(), user, cost);
     }
 }