public ServiceAccountDTO TestExcelAccount(ServiceAccountDTO accountForTest, Byte[] fileForParce)
        {
            IAccountSettings currentAccountForTest = SettingsManager.GetCurrentInstance(accountForTest.Source);

            currentAccountForTest = currentAccountForTest.Convert(accountForTest.ServiceAccountDTOToDomain());
            ExcelAdapter currentAdapter = new ExcelAdapter(currentAccountForTest, fileForParce);

            IAccountSettings testResult   = currentAdapter.TestAccount(currentAccountForTest);
            ServiceAccount   resultDomain = new ServiceAccount();

            resultDomain = testResult.Convert(testResult);
            ServiceAccountDTO result = resultDomain.ServiceAccountDomainToDTO();

            return(result);
        }
 public void GetTasksFromExcel(Byte[] fileForParce, Int32 tokenID, String updateTime)
 {
     try
     {
         ExcelAdapter excelAdapter = new ExcelAdapter(fileForParce, tokenID);
         excelAdapter.RunAdapter();
         IList <ITask> allTasksFromexcel = excelAdapter.GetAllTasks();
         if (allTasksFromexcel != null)
         {
             AutoUpdater.AddTaskForSaveving(allTasksFromexcel);
             excelAdapter.ID = tokenID;
             excelAdapter.UpdateTokenLastUpdateTime(updateTime);
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
         throw new SoapException("Fault occurred", SoapException.ClientFaultCode, Context.Request.Url.AbsoluteUri, ex);
     }
 }
        public ServiceAccountDTO TestExcelAccount(ServiceAccountDTO accountForTest, Byte[] fileForParce)
        {
            IAccountSettings currentAccountForTest = SettingsManager.GetCurrentInstance(accountForTest.Source);

            currentAccountForTest = currentAccountForTest.Convert(accountForTest.ServiceAccountDTOToDomain());
            ExcelAdapter currentAdapter = new ExcelAdapter(currentAccountForTest, fileForParce);

            IAccountSettings testResult = currentAdapter.TestAccount(currentAccountForTest);
            ServiceAccount resultDomain = new ServiceAccount();
            resultDomain = testResult.Convert(testResult);
            ServiceAccountDTO result = resultDomain.ServiceAccountDomainToDTO();
            return result;
        }
 public void GetTasksFromExcel(Byte[] fileForParce, Int32 tokenID, String updateTime)
 {
     try
     {
         ExcelAdapter excelAdapter = new ExcelAdapter(fileForParce, tokenID);
         excelAdapter.RunAdapter();
         IList<ITask> allTasksFromexcel = excelAdapter.GetAllTasks();
         if (allTasksFromexcel != null)
         {
             AutoUpdater.AddTaskForSaveving(allTasksFromexcel);
             excelAdapter.ID = tokenID;
             excelAdapter.UpdateTokenLastUpdateTime(updateTime);
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
         throw new SoapException("Fault occurred", SoapException.ClientFaultCode, Context.Request.Url.AbsoluteUri, ex);
     }
 }