public static bool PushSetting(string xml, string guid)
        {
            string xmldata   = xml;
            var    connected = Extensions.CheckForInternetConnection();

            if (!connected)
            {
                return(false);
            }
            SQL_Request req = new SQL_Request().OpenConnection();
            //barcode was scanned or manually inputted
            var sql_settings = GetSetting(guid);

            if (sql_settings == null)
            {
                var result = req.SettingsAdd(guid, xmldata);
                return(true);
            }


            try
            {
                var result = req.SettingsUpdate(guid, xmldata);
            }
            catch
            {
                return(false);
            }
            finally { req.CloseConnection(); }
            return(true);
        }
        public static bool PushSetting(SettingsDBData data)
        {
            var connected = Extensions.CheckForInternetConnection();

            if (!connected)
            {
                return(false);
            }
            SQL_Request req = new SQL_Request().OpenConnection();
            //barcode was scanned or manually inputted
            var sql_settings = GetSetting(data.Appname);

            if (sql_settings == null)
            {
                var result = req.SettingsAdd(data.Appname, data.XmlData, data.XmlData2, data.XmlData3, data.XmlData4, data.XmlData5);
                return(true);
            }


            try
            {
                var result = req.SettingsUpdate(data.Appname, data.XmlData, data.XmlData2, data.XmlData3, data.XmlData4, data.XmlData5);
            }
            catch
            {
                return(false);
            }
            finally { req.CloseConnection(); }
            return(true);
        }
        public static bool PushSettings(Settings settings, string AppName = "AWP_STARRAG_US")
        {
            string xmldata   = settings.Serialize();
            var    connected = Extensions.CheckForInternetConnection();

            if (!connected)
            {
                return(false);
            }
            SQL_Request req = new SQL_Request().OpenConnection();
            //barcode was scanned or manually inputted
            var sql_settings = GetSettings();

            if (sql_settings == null)
            {
                var result = req.SettingsAdd(AppName, xmldata);
                return(true);
            }


            try
            {
                var result = req.SettingsUpdate(AppName, xmldata);
            }
            catch
            {
                return(false);
            }
            finally { req.CloseConnection(); }
            return(true);
        }