Пример #1
0
 public void step_06_s()
 {
     Logger.PrintStepName("Step 6");
     SubscriberService.SubscriberInterface si             = new SubscriberInterfaceClient();
     SubscriberService.restoreCTNRequest   restoreRequest = new restoreCTNRequest();
     restoreRequest.hash       = ths.GetHashAPI(ctn + lockdatefutH + "RSBO");
     restoreRequest.ctn        = ctn;
     restoreRequest.reasonCode = "RSBO";
     restoreRequest.token      = token;
     restoreRequest.actvDate   = lockdatefut;
     try
     {
         Logger.PrintAction("Разблокировка будущей датой", "");
         SubscriberService.restoreCTNResponse requestResponse = si.restoreCTN(restoreRequest);
         if (requestResponse != null)
         {
             Logger.PrintRezult(true, "Заявка создана " + requestResponse.@return);
         }
         else
         {
             Logger.PrintRezult(false, "Заявка не создана");
         }
         Thread.Sleep(12000);
     }
     catch (Exception ex)
     {
         Logger.PrintRezult(false, "Ошибка при блокировке: " + ex.Message);
     }
     Thread.Sleep(12000);
 }
Пример #2
0
        public void step_04()
        {
            Logger.PrintStepName("Step 4");
            SubscriberService.SubscriberInterface si             = new SubscriberInterfaceClient();
            SubscriberService.replaceSIMRequest   replaceRequest = new replaceSIMRequest();
            SubscriberService.suspendCTNRequest   suspendRequest = new suspendCTNRequest();
            SubscriberService.restoreCTNRequest   restoreRequest = new restoreCTNRequest();


            replaceRequest.ctn   = ctn;
            replaceRequest.token = token;
            newSim =
                Executor.ExecuteSelect("select serial_no from serial_item_inv@" + db_Ans +
                                       " where primary_ctn is null and ngp=1 and resource_status='AA'")[2, 0];
            replaceRequest.serialNumber = newSim;

            suspendRequest.ctn        = ctn;
            suspendRequest.reasonCode = "WIB";
            suspendRequest.token      = token;
            suspendRequest.actvDate   = lockdatenow;

            restoreRequest.ctn        = ctn;
            restoreRequest.reasonCode = "RSBO";
            restoreRequest.token      = token;
            restoreRequest.actvDate   = lockdatenow;
            try
            {
                Logger.PrintAction("Замена сим 105 AT", "");
                SubscriberService.suspendCTNResponse suspendCtnResponse = si.suspendCTN(suspendRequest);
                Thread.Sleep(15000);
                Logger.PrintAction("Заблокирован WIB ", [email protected]());
                SubscriberService.replaceSIMResponse requestResponse = si.replaceSIM(replaceRequest);
                long s = requestResponse.@return;
                Logger.PrintAction("Заявка на замену сим создана", s.ToString());
                Logger.PrintRezult(true, "");

                SubscriberService.restoreCTNResponse restoreResponse = si.restoreCTN(restoreRequest);
                Logger.PrintAction("Разблокировка", [email protected]());
                Thread.Sleep(15000);
            }
            catch (FaultException <UssWsApiException> exception)
            {
                Logger.PrintRezult(false, exception.Detail.errorCode + exception.Detail.errorDescription);
            }
            catch (Exception ex)
            {
                Assertion("Ошибка при замене сим: " + ex.Message, Assert.Fail);
            }
        }