Ejemplo n.º 1
0
 public void CreateWebClientHelper()
 {
     Assert.DoesNotThrow(
         () =>
     {
         factory.GetWebClientHelper();
     }
         );
 }
Ejemplo n.º 2
0
        public string PostData(IKisaErdModel model)
        {
            try
            {
                var factory      = new HelpersFactory();
                var responceJson = factory.GetWebClientHelper().PostData(model, Config.UrlErdKisaPost);

                dynamic jsonObject = Json.Decode(responceJson);

                return(factory.GetParseHtmlHelper().GetResultTable(jsonObject[1].data));
            }
            catch (Exception ee)
            {
                return(String.Format("An error has occurred:{0}", ee.Message));
            }
        }
Ejemplo n.º 3
0
        public KisaErdModel GetIndexModel()
        {
            try
            {
                var factory     = new HelpersFactory();
                var dataFromWeb = factory.GetWebClientHelper().GetData(Config.UrlErdKisaGet);

                return(factory.GetParseHtmlHelper().FillModel(dataFromWeb));
            }
            catch (Exception ee)
            {
                return(new KisaErdModel
                {
                    exception_text = String.Format("An error has occurred during refreshing form elements:{0}", ee.Message)
                });
            }
        }