Esempio n. 1
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(JMP.MDL.jmp_liveteral model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update jmp_liveteral set ");

            strSql.Append(" l_teral_key = @l_teral_key , ");
            strSql.Append(" l_time = @l_time,l_appid=@l_appid  ");
            strSql.Append(" where l_id=@l_id ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@l_id",        SqlDbType.Int,        4),
                new SqlParameter("@l_teral_key", SqlDbType.NVarChar,  -1),
                new SqlParameter("@l_time",      SqlDbType.DateTime),
                new SqlParameter("@l_appid",     SqlDbType.Int, 4)
            };

            parameters[0].Value = model.l_id;
            parameters[1].Value = model.l_teral_key;
            parameters[2].Value = model.l_time;
            parameters[3].Value = model.l_appid;
            int rows = DbHelperSQLDEVICE.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 批量删除一批数据
        /// </summary>
        public bool DeleteList(string l_idlist)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from jmp_liveteral ");
            strSql.Append(" where ID in (" + l_idlist + ")  ");
            int rows = DbHelperSQLDEVICE.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(JMP.MDL.jmp_aes model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update jmp_aes set ");

            strSql.Append(" yw = @yw , ");
            strSql.Append(" mw = @mw , ");
            strSql.Append(" mwdx = @mwdx , ");
            strSql.Append(" bdx = @bdx , ");
            strSql.Append(" time = @time  ");
            strSql.Append(" where id=@id ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@id",   SqlDbType.Int,       4),
                new SqlParameter("@yw",   SqlDbType.NVarChar, -1),
                new SqlParameter("@mw",   SqlDbType.NVarChar, -1),
                new SqlParameter("@mwdx", SqlDbType.NVarChar, -1),
                new SqlParameter("@bdx",  SqlDbType.NVarChar, -1),
                new SqlParameter("@time", SqlDbType.DateTime)
            };

            parameters[0].Value = model.id;
            parameters[1].Value = model.yw;
            parameters[2].Value = model.mw;
            parameters[3].Value = model.mwdx;
            parameters[4].Value = model.bdx;
            parameters[5].Value = model.time;
            int rows = DbHelperSQLDEVICE.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int l_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from jmp_liveteral ");
            strSql.Append(" where l_id=@l_id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@l_id", SqlDbType.Int, 4)
            };
            parameters[0].Value = l_id;


            int rows = DbHelperSQLDEVICE.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(JMP.MDL.jmp_terminal model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update jmp_terminal set ");

            strSql.Append(" t_system = @t_system , ");
            strSql.Append(" t_hardware = @t_hardware , ");
            strSql.Append(" t_sdkver = @t_sdkver , ");
            strSql.Append(" t_time = @t_time , ");
            strSql.Append(" t_screen = @t_screen , ");
            strSql.Append(" t_network = @t_network , ");
            strSql.Append(" t_appid = @t_appid , ");
            strSql.Append(" t_key = @t_key , ");
            strSql.Append(" t_mark = @t_mark , ");
            strSql.Append(" t_ip = @t_ip , ");
            strSql.Append(" t_province = @t_province , ");
            strSql.Append(" t_imsi = @t_imsi , ");
            strSql.Append(" t_nettype = @t_nettype , ");
            strSql.Append(" t_brand = @t_brand  ");
            strSql.Append(" where t_id=@t_id ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@t_id",       SqlDbType.Int,        4),
                new SqlParameter("@t_system",   SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_hardware", SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_sdkver",   SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_time",     SqlDbType.DateTime),
                new SqlParameter("@t_screen",   SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_network",  SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_appid",    SqlDbType.Int,        4),
                new SqlParameter("@t_key",      SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_mark",     SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_ip",       SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_province", SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_imsi",     SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_nettype",  SqlDbType.NVarChar,  -1),
                new SqlParameter("@t_brand",    SqlDbType.NVarChar, -1)
            };

            parameters[0].Value  = model.t_id;
            parameters[1].Value  = model.t_system;
            parameters[2].Value  = model.t_hardware;
            parameters[3].Value  = model.t_sdkver;
            parameters[4].Value  = model.t_time;
            parameters[5].Value  = model.t_screen;
            parameters[6].Value  = model.t_network;
            parameters[7].Value  = model.t_appid;
            parameters[8].Value  = model.t_key;
            parameters[9].Value  = model.t_mark;
            parameters[10].Value = model.t_ip;
            parameters[11].Value = model.t_province;
            parameters[12].Value = model.t_imsi;
            parameters[13].Value = model.t_nettype;
            parameters[14].Value = model.t_brand;
            int rows = DbHelperSQLDEVICE.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }