/// <summary> /// 增加一条数据 /// </summary> public bool Add(JMP.MDL.jmp_revenue_active model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into jmp_revenue_active("); strSql.Append("r_users,r_moneys,r_orders,r_date,r_appid"); strSql.Append(") values ("); strSql.Append("@r_users,@r_moneys,@r_orders,@r_date,@r_appid"); strSql.Append(") "); SqlParameter[] parameters = { new SqlParameter("@r_users", SqlDbType.Int, 4), new SqlParameter("@r_moneys", SqlDbType.Decimal, 17), new SqlParameter("@r_orders", SqlDbType.Int, 4), new SqlParameter("@r_date", SqlDbType.DateTime), new SqlParameter("@r_appid", SqlDbType.Int, 4) }; parameters[0].Value = model.r_users; parameters[1].Value = model.r_moneys; parameters[2].Value = model.r_orders; parameters[3].Value = model.r_date; parameters[4].Value = model.r_appid; return(DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters) > 0); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_sales_user model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_sales_user set "); strSql.Append("r_appid=@r_appid,"); strSql.Append("r_moneys=@r_moneys,"); strSql.Append("r_date=@r_date"); strSql.Append(" where r_id=@r_id "); SqlParameter[] parameters = { new SqlParameter("@r_id", SqlDbType.Int, 4), new SqlParameter("@r_appid", SqlDbType.Int, 4), new SqlParameter("@r_moneys", SqlDbType.Money, 8), new SqlParameter("@r_date", SqlDbType.DateTime) }; parameters[0].Value = model.r_id; parameters[1].Value = model.r_appid; parameters[2].Value = model.r_moneys; parameters[3].Value = model.r_date; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_app_report model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_app_report set "); strSql.Append("r_times=@r_times,"); strSql.Append("r_starttime=@r_starttime,"); strSql.Append("r_username=@r_username,"); strSql.Append("r_uid=@r_uid,"); strSql.Append("r_app_key=@r_app_key,"); strSql.Append("r_app_name=@r_app_name,"); strSql.Append("r_equipment=@r_equipment,"); strSql.Append("r_succeed=@r_succeed,"); strSql.Append("r_notpay=@r_notpay,"); strSql.Append("r_alipay=@r_alipay"); strSql.Append(" where r_id=@r_id"); SqlParameter[] parameters = { new SqlParameter("@r_times", SqlDbType.DateTime), new SqlParameter("@r_starttime", SqlDbType.DateTime), new SqlParameter("@r_username", SqlDbType.NVarChar, -1), new SqlParameter("@r_uid", SqlDbType.Int, 4), new SqlParameter("@r_app_key", SqlDbType.NVarChar, -1), new SqlParameter("@r_app_name", SqlDbType.NVarChar, -1), new SqlParameter("@r_equipment", SqlDbType.Int, 4), new SqlParameter("@r_succeed", SqlDbType.Int, 4), new SqlParameter("@r_notpay", SqlDbType.Int, 4), new SqlParameter("@r_alipay", SqlDbType.Money, 8), new SqlParameter("@r_id", SqlDbType.Int, 4) }; parameters[0].Value = model.r_times; parameters[1].Value = model.r_starttime; parameters[2].Value = model.r_username; parameters[3].Value = model.r_uid; parameters[4].Value = model.r_app_key; parameters[5].Value = model.r_app_name; parameters[6].Value = model.r_equipment; parameters[7].Value = model.r_succeed; parameters[8].Value = model.r_notpay; parameters[9].Value = model.r_alipay; parameters[10].Value = model.r_id; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_defect model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_defect set "); strSql.Append(" d_type = @d_type , "); strSql.Append(" d_aapid = @d_aapid , "); strSql.Append(" d_losscount = @d_losscount , "); strSql.Append(" d_lossproportion = @d_lossproportion , "); strSql.Append(" d_usercount = @d_usercount , "); strSql.Append(" d_datatype = @d_datatype , "); strSql.Append(" d_time = @d_time "); strSql.Append(" where d_id=@d_id "); SqlParameter[] parameters = { new SqlParameter("@d_id", SqlDbType.Int, 4), new SqlParameter("@d_type", SqlDbType.Int, 4), new SqlParameter("@d_aapid", SqlDbType.Int, 4), new SqlParameter("@d_losscount", SqlDbType.Int, 4), new SqlParameter("@d_lossproportion", SqlDbType.Decimal, 5), new SqlParameter("@d_usercount", SqlDbType.Int, 4), new SqlParameter("@d_datatype", SqlDbType.Int, 4), new SqlParameter("@d_time", SqlDbType.DateTime) }; parameters[0].Value = model.d_id; parameters[1].Value = model.d_type; parameters[2].Value = model.d_aapid; parameters[3].Value = model.d_losscount; parameters[4].Value = model.d_lossproportion; parameters[5].Value = model.d_usercount; parameters[6].Value = model.d_datatype; parameters[7].Value = model.d_time; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 批量删除一批数据 /// </summary> public bool DeleteList(string d_idlist) { StringBuilder strSql = new StringBuilder(); strSql.Append("delete from jmp_defect "); strSql.Append(" where ID in (" + d_idlist + ") "); int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString()); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_paychannel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_paychannel set "); strSql.Append(" payname = @payname , "); strSql.Append(" payid = @payid , "); strSql.Append(" money = @money , "); strSql.Append(" datetimes = @datetimes, "); strSql.Append(" paytype = @paytype, "); strSql.Append(" success=@success, successratio=@successratio, notpay=@notpay "); strSql.Append(" where id=@id "); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int, 4), new SqlParameter("@payname", SqlDbType.NVarChar, -1), new SqlParameter("@payid", SqlDbType.Int, 4), new SqlParameter("@money", SqlDbType.Decimal, 9), new SqlParameter("@datetimes", SqlDbType.DateTime), new SqlParameter("@paytype", SqlDbType.NVarChar, -1), new SqlParameter("@success", model.success), new SqlParameter("@successratio", model.successratio), new SqlParameter("@notpay", model.notpay) }; parameters[0].Value = model.id; parameters[1].Value = model.payname; parameters[2].Value = model.payid; parameters[3].Value = model.money; parameters[4].Value = model.datetimes; parameters[5].Value = model.paytype; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int r_id) { StringBuilder strSql = new StringBuilder(); strSql.Append("delete from jmp_revenue_add "); strSql.Append(" where r_id=@r_id"); SqlParameter[] parameters = { new SqlParameter("@r_id", SqlDbType.Int, 4) }; parameters[0].Value = r_id; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_statistics model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_statistics set "); strSql.Append(" s_brand = @s_brand , "); strSql.Append(" s_app_id = @s_app_id , "); strSql.Append(" s_count = @s_count , "); strSql.Append(" s_time = @s_time "); strSql.Append(" where s_id=@s_id "); SqlParameter[] parameters = { new SqlParameter("@s_id", SqlDbType.Int, 4), new SqlParameter("@s_brand", SqlDbType.NVarChar, -1), new SqlParameter("@s_app_id", SqlDbType.Int, 4), new SqlParameter("@s_count", SqlDbType.Int, 4), new SqlParameter("@s_time", SqlDbType.DateTime) }; parameters[0].Value = model.s_id; parameters[1].Value = model.s_brand; parameters[2].Value = model.s_app_id; parameters[3].Value = model.s_count; parameters[4].Value = model.s_time; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_trends model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_trends set "); strSql.Append(" t_app_id = @t_app_id , "); strSql.Append(" t_newcount = @t_newcount , "); strSql.Append(" t_activecount = @t_activecount , "); strSql.Append(" t_time = @t_time "); strSql.Append(" where t_id=@t_id "); SqlParameter[] parameters = { new SqlParameter("@t_id", SqlDbType.Int, 4), new SqlParameter("@t_app_id", SqlDbType.Int, 4), new SqlParameter("@t_newcount", SqlDbType.Int, 4), new SqlParameter("@t_activecount", SqlDbType.Int, 4), new SqlParameter("@t_time", SqlDbType.DateTime) }; parameters[0].Value = model.t_id; parameters[1].Value = model.t_app_id; parameters[2].Value = model.t_newcount; parameters[3].Value = model.t_activecount; parameters[4].Value = model.t_time; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_resolution model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_resolution set "); strSql.Append(" r_screen = @r_screen , "); strSql.Append(" r_app_id = @r_app_id , "); strSql.Append(" r_count = @r_count , "); strSql.Append(" r_time = @r_time "); strSql.Append(" where r_id=@r_id "); SqlParameter[] parameters = { new SqlParameter("@r_id", SqlDbType.Int, 4), new SqlParameter("@r_screen", SqlDbType.NVarChar, -1), new SqlParameter("@r_app_id", SqlDbType.Int, 4), new SqlParameter("@r_count", SqlDbType.Int, 4), new SqlParameter("@r_time", SqlDbType.DateTime) }; parameters[0].Value = model.r_id; parameters[1].Value = model.r_screen; parameters[2].Value = model.r_app_id; parameters[3].Value = model.r_count; parameters[4].Value = model.r_time; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_modelnumber model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_modelnumber set "); strSql.Append(" m_sdkver = @m_sdkver , "); strSql.Append(" m_app_id = @m_app_id , "); strSql.Append(" m_count = @m_count , "); strSql.Append(" m_time = @m_time "); strSql.Append(" where m_id=@m_id "); SqlParameter[] parameters = { new SqlParameter("@m_id", SqlDbType.Int, 4), new SqlParameter("@m_sdkver", SqlDbType.NVarChar, -1), new SqlParameter("@m_app_id", SqlDbType.Int, 4), new SqlParameter("@m_count", SqlDbType.Int, 4), new SqlParameter("@m_time", SqlDbType.DateTime) }; parameters[0].Value = model.m_id; parameters[1].Value = model.m_sdkver; parameters[2].Value = model.m_app_id; parameters[3].Value = model.m_count; parameters[4].Value = model.m_time; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_operatingsystem model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_operatingsystem set "); strSql.Append(" o_system = @o_system , "); strSql.Append(" o_app_id = @o_app_id , "); strSql.Append(" o_count = @o_count , "); strSql.Append(" o_time = @o_time "); strSql.Append(" where o_id=@o_id "); SqlParameter[] parameters = { new SqlParameter("@o_id", SqlDbType.Int, 4), new SqlParameter("@o_system", SqlDbType.NVarChar, -1), new SqlParameter("@o_app_id", SqlDbType.Int, 4), new SqlParameter("@o_count", SqlDbType.Int, 4), new SqlParameter("@o_time", SqlDbType.DateTime) }; parameters[0].Value = model.o_id; parameters[1].Value = model.o_system; parameters[2].Value = model.o_app_id; parameters[3].Value = model.o_count; parameters[4].Value = model.o_time; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_province model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_province set "); strSql.Append(" p_province = @p_province , "); strSql.Append(" p_appid = @p_appid , "); strSql.Append(" p_count = @p_count , "); strSql.Append(" p_time = @p_time "); strSql.Append(" where p_id=@p_id "); SqlParameter[] parameters = { new SqlParameter("@p_id", SqlDbType.Int, 4), new SqlParameter("@p_province", SqlDbType.NVarChar, 50), new SqlParameter("@p_appid", SqlDbType.Int, 4), new SqlParameter("@p_count", SqlDbType.Int, 4), new SqlParameter("@p_time", SqlDbType.DateTime) }; parameters[0].Value = model.p_id; parameters[1].Value = model.p_province; parameters[2].Value = model.p_appid; parameters[3].Value = model.p_count; parameters[4].Value = model.p_time; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_keep model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_keep set "); strSql.Append(" k_day6 = @k_day6 , "); strSql.Append(" k_day7 = @k_day7 , "); strSql.Append(" k_day14 = @k_day14 , "); strSql.Append(" k_day30 = @k_day30 , "); strSql.Append(" k_time = @k_time , "); strSql.Append(" k_app_id = @k_app_id , "); strSql.Append(" k_type = @k_type , "); strSql.Append(" k_usercount = @k_usercount , "); strSql.Append(" k_day1 = @k_day1 , "); strSql.Append(" k_day2 = @k_day2 , "); strSql.Append(" k_day3 = @k_day3 , "); strSql.Append(" k_day4 = @k_day4 , "); strSql.Append(" k_day5 = @k_day5 "); strSql.Append(" where k_id=@k_id "); SqlParameter[] parameters = { new SqlParameter("@k_id", SqlDbType.Int, 4), new SqlParameter("@k_day6", SqlDbType.Decimal, 5), new SqlParameter("@k_day7", SqlDbType.Decimal, 5), new SqlParameter("@k_day14", SqlDbType.Decimal, 5), new SqlParameter("@k_day30", SqlDbType.Decimal, 5), new SqlParameter("@k_time", SqlDbType.DateTime), new SqlParameter("@k_app_id", SqlDbType.Int, 4), new SqlParameter("@k_type", SqlDbType.Int, 4), new SqlParameter("@k_usercount", SqlDbType.Int, 4), new SqlParameter("@k_day1", SqlDbType.Decimal, 5), new SqlParameter("@k_day2", SqlDbType.Decimal, 5), new SqlParameter("@k_day3", SqlDbType.Decimal, 5), new SqlParameter("@k_day4", SqlDbType.Decimal, 5), new SqlParameter("@k_day5", SqlDbType.Decimal, 5) }; parameters[0].Value = model.k_id; parameters[1].Value = model.k_day6; parameters[2].Value = model.k_day7; parameters[3].Value = model.k_day14; parameters[4].Value = model.k_day30; parameters[5].Value = model.k_time; parameters[6].Value = model.k_app_id; parameters[7].Value = model.k_type; parameters[8].Value = model.k_usercount; parameters[9].Value = model.k_day1; parameters[10].Value = model.k_day2; parameters[11].Value = model.k_day3; parameters[12].Value = model.k_day4; parameters[13].Value = model.k_day5; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_appreport model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update jmp_appreport set "); strSql.Append(" a_successratio = @a_successratio , "); strSql.Append(" a_alipay = @a_alipay , "); strSql.Append(" a_wechat = @a_wechat , "); strSql.Append(" a_curr = @a_curr , "); strSql.Append(" a_arpur = @a_arpur , "); strSql.Append(" a_datetime = @a_datetime , "); strSql.Append(" a_time = @a_time , "); strSql.Append(" a_appname = @a_appname , "); strSql.Append(" a_appid = @a_appid , "); strSql.Append(" a_uerid = @a_uerid , "); strSql.Append(" a_equipment = @a_equipment , "); strSql.Append(" a_count = @a_count , "); strSql.Append(" a_success = @a_success , "); strSql.Append(" a_notpay = @a_notpay , "); strSql.Append(" a_request = @a_request, "); strSql.Append(" a_money=@a_money "); strSql.Append(" a_qqwallet=@a_qqwallet "); strSql.Append(" where a_id=@a_id "); SqlParameter[] parameters = { new SqlParameter("@a_id", SqlDbType.Int, 4), new SqlParameter("@a_successratio", SqlDbType.Decimal, 9), new SqlParameter("@a_alipay", SqlDbType.Decimal, 9), new SqlParameter("@a_wechat", SqlDbType.Decimal, 9), new SqlParameter("@a_curr", SqlDbType.Decimal, 9), new SqlParameter("@a_arpur", SqlDbType.Decimal, 9), new SqlParameter("@a_datetime", SqlDbType.DateTime), new SqlParameter("@a_time", SqlDbType.DateTime), new SqlParameter("@a_appname", SqlDbType.NVarChar, -1), new SqlParameter("@a_appid", SqlDbType.Int, 4), new SqlParameter("@a_uerid", SqlDbType.Int, 4), new SqlParameter("@a_equipment", SqlDbType.Decimal, 9), new SqlParameter("@a_count", SqlDbType.Decimal, 9), new SqlParameter("@a_success", SqlDbType.Decimal, 9), new SqlParameter("@a_notpay", SqlDbType.Decimal, 9), new SqlParameter("@a_request", SqlDbType.Decimal, 9), new SqlParameter("@a_money", SqlDbType.Decimal, 9), new SqlParameter("@a_qqwallet", SqlDbType.Decimal, 9) }; parameters[0].Value = model.a_id; parameters[1].Value = model.a_successratio; parameters[2].Value = model.a_alipay; parameters[3].Value = model.a_wechat; parameters[4].Value = model.a_curr; parameters[5].Value = model.a_arpur; parameters[6].Value = model.a_datetime; parameters[7].Value = model.a_time; parameters[8].Value = model.a_appname; parameters[9].Value = model.a_appid; parameters[10].Value = model.a_uerid; parameters[11].Value = model.a_equipment; parameters[12].Value = model.a_count; parameters[13].Value = model.a_success; parameters[14].Value = model.a_notpay; parameters[15].Value = model.a_request; parameters[16].Value = model.a_money; parameters[17].Value = model.a_qqwallet; int rows = DbHelperSQLTotal.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }