Ejemplo n.º 1
0
 public override void CommitOrThrow_TelNumberAdd(MobileHandleConfUnconfList existing, MobileNoHandler noToAdd)
 {
     Data_AppUserFile.niceMoney totalCost = monthlyDifPrice.monthlyDifPrice_CostPerNumber.MultiplyBy(noToAdd.MobileNumbersCount);
     if (!monthlyDifPrice.monthlyDifPrice_CurrentCredit.DeductIfEnoughFund(totalCost))
     {
         throw new ArgumentException("Not enouth fonds on account");
     }
 }
Ejemplo n.º 2
0
 public override void CommitOrThrow_TelNumberAdd(MobileHandleConfUnconfList existing, MobileNoHandler noToAdd)
 {
     Data_AppUserFile.niceMoney totalCost = monthly.monthly_CostPerNumber.MultiplyBy(noToAdd.MobileNumbersCount);
     if (monthly.monthly_CurrentCredit.ValueInUsCent < totalCost.ValueInUsCent)
     {
         throw new ArgumentException("Not enouth fonds on account");
     }
     monthly.monthly_CurrentCredit.ValueInUsCent -= totalCost.ValueInUsCent;
 }
Ejemplo n.º 3
0
        public static void VerifyAllMobileNumbers(MobileNoHandler storedNumbers, string[] telList)
        {
            MobileHandleConfUnconfList list = new MobileHandleConfUnconfList();

            list.Add(storedNumbers.getVal, true);
            foreach (string reqTel in telList)
            {
                if (!list.Conrtains(reqTel))
                {
                    throw new ArgumentException("X-APIMobile not configured");
                }
            }
        }
Ejemplo n.º 4
0
        public static string CommitOrThrow_TelNumberRemove(this Data_AppUserFile appUserFile, string TelList)
        {
            Data_AppUserFile_CheckerBase checker = appUserFile.GetCheckerBase();

            if (checker == null)
            {
                throw new ArgumentException("Account not active (4). " + appUserFile.AccountStatusExplained());
            }
            MobileNoHandler            noToRemove = new MobileNoHandler(TelList);
            MobileHandleConfUnconfList existing   = new MobileHandleConfUnconfList();

            existing.Add(appUserFile.MobileNumbers_AllConfirmed__.getVal, true);
            existing.Add(appUserFile.MobileNumbers_AllUnConfirmed__.getVal, false);
            checker.CommitOrThrow_TelNumberRemove(existing, noToRemove);

            existing.Remove(TelList);
            string retString;

            existing.SortAndReturn(out appUserFile.MobileNumbers_AllConfirmed__, out appUserFile.MobileNumbers_AllUnConfirmed__, out retString);
            return(retString);
        }
Ejemplo n.º 5
0
 public override void CommitOrThrow_TelNumberRemove(MobileHandleConfUnconfList existing, MobileNoHandler noToRemove)
 {
 }
Ejemplo n.º 6
0
 public abstract void CommitOrThrow_TelNumberRemove(MobileHandleConfUnconfList existing, MobileNoHandler noToRemove);
Ejemplo n.º 7
0
 public abstract void CommitOrThrow_TelNumberAdd(MobileHandleConfUnconfList existing, MobileNoHandler noToAdd);
Ejemplo n.º 8
0
 public override void CommitOrThrow_TelNumberRemove(MobileHandleConfUnconfList existing, MobileNoHandler noToRemove)
 {
     throw new ArgumentException("Tel number manipulation not allowed");
 }