Exemple #1
0
        /// <summary>
        /// Получает информацию по полисам
        /// </summary>
        /// <param name="pacient">Пациент, для которого ищем полиса</param>
        /// <returns></returns>
        public IEnumerable <PolicyInfo> GetPolicyInfos(PacientInfo pacient)
        {
            ErrorMessage = string.Empty;

            var result = FormWebBrowser.Start(pacient);

            if (result == null || result.Count == 0)
            {
                ErrorMessage = FormWebBrowser.GetErrorMessage();
            }
            return(result);
        }
 public static List <PolicyInfo> Start(PacientInfo pacient)
 {
     Completed = false;
     _instance = _instance ?? new FormWebBrowser();
     _instance.Initialiaze(pacient);
     _instance.Navigate();
     do
     {
         Thread.Sleep(100);
     } while (!Completed);
     return(_instance._polices);
 }