Exemplo n.º 1
0
        public static string GetNextCommand(int systemId)
        {
            MySQLParameterList sqlParams = new MySQLParameterList();

            sqlParams.AddParameter("p_systemId", systemId);
            return((string)MySQLDatabaseManager.ExecuteScalar("spGetCommand", sqlParams).ToString());
        }
Exemplo n.º 2
0
        public static bool CheckSystemExists(string ip, string mac)
        {
            MySQLParameterList sqlParams = new MySQLParameterList();

            sqlParams.AddParameter("p_ip", ip);
            sqlParams.AddParameter("p_mac", mac);
            bool   rtn    = false;
            int    result = -1;
            object x;

            x = MySQLDatabaseManager.ExecuteScalar("spCheckSystem", sqlParams);


            result = Convert.ToInt32(x);

            if (result > 0)
            {
                rtn = true;
            }
            else
            {
                rtn = false;
            }

            return(rtn);
        }
Exemplo n.º 3
0
        public static void SaveAuthKey(string ip, string mac, string authKey)
        {
            MySQLParameterList sqlParams = new MySQLParameterList();

            sqlParams.AddParameter("p_ip", ip);
            sqlParams.AddParameter("p_mac", mac);
            sqlParams.AddParameter("p_authKey", authKey);
            int result = -1;

            MySQLDatabaseManager.ExecuteScalar("spLogAuthKey", sqlParams);
        }
Exemplo n.º 4
0
        public static void SaveContentAd(
            string adboxsize,
            DateTime expirydate,
            string expirylength,
            DateTime publishdate,
            string priority,
            string cssstyle,
            string bgcolor,
            string font,
            string fontsize,
            bool premium,
            string category,
            string heading,
            string contact,
            string htmltext,
            bool qr,
            string systemId,
            string recordStatus,
            int approved,
            string supercedeId
            )
        {
            string idbtvuser = baz.utils.bazutils.GetUserSessionVal("idbtvusers");

            MySQLParameterList sqlParams = new MySQLParameterList();

            sqlParams.AddParameter("p_adboxsize", adboxsize);
            sqlParams.AddParameter("p_expirydate", expirydate);
            sqlParams.AddParameter("p_expirylength", expirylength);
            sqlParams.AddParameter("p_publishdate", publishdate);
            sqlParams.AddParameter("p_priority", priority);
            sqlParams.AddParameter("p_cssstyle", cssstyle);
            sqlParams.AddParameter("p_bgcolor", bgcolor);
            sqlParams.AddParameter("p_font", font);
            sqlParams.AddParameter("p_fontsize", fontsize);
            sqlParams.AddParameter("p_premium", premium);
            sqlParams.AddParameter("p_category", category);

            sqlParams.AddParameter("p_heading", heading);
            sqlParams.AddParameter("p_contact", contact);
            sqlParams.AddParameter("p_htmltext", htmltext);
            sqlParams.AddParameter("p_qrcode", qr);
            sqlParams.AddParameter("p_btvuser", idbtvuser);

            sqlParams.AddParameter("p_systemid", systemId);

            sqlParams.AddParameter("p_recordStatus", recordStatus);
            sqlParams.AddParameter("p_approved", approved);
            sqlParams.AddParameter("p_supercedeid", supercedeId);

            int result = -1;

            MySQLDatabaseManager.ExecuteScalar("spPostAd", sqlParams);
        }
Exemplo n.º 5
0
        public static bool IsUserAlreadyRegistered(string email)
        {
            MySQLParameterList sqlParams = new MySQLParameterList();

            sqlParams.AddParameter("p_email", email);
            //sqlParams.AddParameter("p_pwd", pwd);
            object o = MySQLDatabaseManager.ExecuteScalar("spBTVuserExists", sqlParams);

            bool flagAuth = false;

            if ((int)Convert.ToInt32(o) > 0)
            {
                flagAuth = true;
            }

            return(flagAuth);
        }
Exemplo n.º 6
0
        public static int GetMaxCmdQId()
        {
            int rtn = 0;

            string sql = "select max(commandqid) from commandq";

            try
            {
                rtn = Convert.ToInt32(MySQLDatabaseManager.ExecuteScalar(sql));
            }

            catch (InvalidCastException ice)
            {
                rtn = 0;
            }


            return(rtn);
        }