예제 #1
0
        private XmlDocument GetNewVersionFile()
        {
            byte[] array = _webaccess.GetFile(LastVersionUrl);
            string xml   = Encoding.UTF8.GetString(array);

            XmlDocument doc = new XmlDocument();

            doc.LoadXml(xml);
            return(doc);
        }
예제 #2
0
        public string InsertPictureInDb(string pictureUrl, object param)
        {
            int gathererId = (int)param;

            IPicture picture = MagicDatabase.GetPicture(gathererId);

            if (picture == null)
            {
                //No id found try insert
                byte[] pictureData = _webAccess.GetFile(pictureUrl);

                MagicDatabase.InsertNewPicture(gathererId, pictureData);
            }

            return(null);
        }