/// <summary> /// 增加一条数据 /// </summary> public void Add(SeoWebSite.Model.Odds1x2History model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into odds1x2history("); strSql.Append("scheduleid,companyid,home,draw,away,homep,drawp,awayp,returnrate,time)"); strSql.Append(" values ("); strSql.Append("@scheduleid,@companyid,@home,@draw,@away,@homep,@drawp,@awayp,@returnrate,@time)"); SqlParameter[] parameters = { new SqlParameter("@scheduleid", SqlDbType.Int), new SqlParameter("@companyid", SqlDbType.Int), new SqlParameter("@home", SqlDbType.Float), new SqlParameter("@draw", SqlDbType.Float), new SqlParameter("@away", SqlDbType.Float), new SqlParameter("@homep", SqlDbType.Float), new SqlParameter("@drawp", SqlDbType.Float), new SqlParameter("@awayp", SqlDbType.Float), new SqlParameter("@returnrate", SqlDbType.Float), new SqlParameter("@time", SqlDbType.DateTime)}; parameters[0].Value = model.scheduleid; parameters[1].Value = model.companyid; parameters[2].Value = model.home; parameters[3].Value = model.draw; parameters[4].Value = model.away; parameters[5].Value = model.homep; parameters[6].Value = model.drawp; parameters[7].Value = model.awayp; parameters[8].Value = model.returnrate; parameters[9].Value = model.time; DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.Schedule model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into Schedule("); strSql.Append("id,data,updated,date,home,away,halfhome,halfaway,h_teamid,g_teamid,scheduleTypeID)"); strSql.Append(" values ("); strSql.Append("@id,@data,@updated,@date,@home,@away,@halfhome,@halfaway,@h_teamid,@g_teamid,@scheduleTypeID)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int,8), new SqlParameter("@data", SqlDbType.NVarChar,1000), new SqlParameter("@updated", SqlDbType.Bit,1), new SqlParameter("@date", SqlDbType.Date,3), new SqlParameter("@home", SqlDbType.Int,4), new SqlParameter("@away", SqlDbType.Int,4), new SqlParameter("@halfhome", SqlDbType.Int,4), new SqlParameter("@halfaway", SqlDbType.Int,4), new SqlParameter("@h_teamid", SqlDbType.Int,4), new SqlParameter("@g_teamid", SqlDbType.Int,4), new SqlParameter("@scheduleTypeID", SqlDbType.Int,4)}; parameters[0].Value = model.id; parameters[1].Value = model.data; parameters[2].Value = model.updated; parameters[3].Value = model.date; parameters[4].Value = model.home; parameters[5].Value = model.away; parameters[6].Value = model.halfhome; parameters[7].Value = model.halfaway; parameters[8].Value = model.h_teamid; parameters[9].Value = model.g_teamid; parameters[10].Value = model.scheduleTypeID; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.BetUser model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into betuser("); strSql.Append("id,username,password,truename,age,sex,qq,mobile,email)"); strSql.Append(" values ("); strSql.Append("@id,@username,@password,@truename,@age,@sex,@qq,@mobile,@email)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.VarChar,20), new SqlParameter("@username", SqlDbType.NVarChar,16), new SqlParameter("@password", SqlDbType.VarChar,32), new SqlParameter("@truename", SqlDbType.NVarChar,32), new SqlParameter("@age", SqlDbType.Int,4), new SqlParameter("@sex", SqlDbType.NVarChar,1), new SqlParameter("@qq", SqlDbType.VarChar,16), new SqlParameter("@mobile", SqlDbType.VarChar,16), new SqlParameter("@email", SqlDbType.VarChar,200)}; parameters[0].Value = model.id; parameters[1].Value = model.username; parameters[2].Value = model.password; parameters[3].Value = model.truename; parameters[4].Value = model.age; parameters[5].Value = model.sex; parameters[6].Value = model.qq; parameters[7].Value = model.mobile; parameters[8].Value = model.email; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(SeoWebSite.Model.ScheduleAnalysis model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into ScheduleAnalysis("); strSql.Append("scheduleid,oddswin,oddsdraw,oddslost,perwin,perdraw,perlost,time)"); strSql.Append(" values ("); strSql.Append("@scheduleid,@oddswin,@oddsdraw,@oddslost,@perwin,@perdraw,@perlost,@time)"); SqlParameter[] parameters = { new SqlParameter("@scheduleid", SqlDbType.Int,4), new SqlParameter("@oddswin", SqlDbType.Float,8), new SqlParameter("@oddsdraw", SqlDbType.Float,8), new SqlParameter("@oddslost", SqlDbType.Float,8), new SqlParameter("@perwin", SqlDbType.Float,8), new SqlParameter("@perdraw", SqlDbType.Float,8), new SqlParameter("@perlost", SqlDbType.Float,8), new SqlParameter("@time", SqlDbType.DateTime)}; parameters[0].Value = model.scheduleid; parameters[1].Value = model.oddswin; parameters[2].Value = model.oddsdraw; parameters[3].Value = model.oddslost; parameters[4].Value = model.perwin; parameters[5].Value = model.perdraw; parameters[6].Value = model.perlost; parameters[7].Value = model.time; DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.BettingLine model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into bettingline("); strSql.Append("id,betmoney,returnmoney,profit,state,formulaid,userid)"); strSql.Append(" values ("); strSql.Append("@id,@betmoney,@returnmoney,@profit,@state,@formulaid,@userid)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.VarChar,20), new SqlParameter("@betmoney", SqlDbType.Decimal,9), new SqlParameter("@returnmoney", SqlDbType.Decimal,9), new SqlParameter("@profit", SqlDbType.Decimal,9), new SqlParameter("@state", SqlDbType.NVarChar,50), new SqlParameter("@formulaid", SqlDbType.VarChar,20), new SqlParameter("@userid", SqlDbType.VarChar,20)}; parameters[0].Value = model.id; parameters[1].Value = model.betmoney; parameters[2].Value = model.returnmoney; parameters[3].Value = model.profit; parameters[4].Value = model.state; parameters[5].Value = model.formulaid; parameters[6].Value = model.userid; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public int Add(SeoWebSite.Model.odds_dx model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into odds_dx("); strSql.Append("companyID,scheduleID,pankou,big,small,time)"); strSql.Append(" values ("); strSql.Append("@companyID,@scheduleID,@pankou,@big,@small,@time)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@companyID", SqlDbType.Int,4), new SqlParameter("@scheduleID", SqlDbType.Int,4), new SqlParameter("@pankou", SqlDbType.Float,8), new SqlParameter("@big", SqlDbType.Float,8), new SqlParameter("@small", SqlDbType.Float,8), new SqlParameter("@time", SqlDbType.DateTime)}; parameters[0].Value = model.companyID; parameters[1].Value = model.scheduleID; parameters[2].Value = model.pankou; parameters[3].Value = model.big; parameters[4].Value = model.small; parameters[5].Value = model.time; object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters); if (obj == null) { return 1; } else { return Convert.ToInt32(obj); } }
/// <summary> /// ����һ������ /// </summary> public int Add(SeoWebSite.Model.odds_bz model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into odds_bz("); strSql.Append("companyID,scheduleID,home,draw,away,time)"); strSql.Append(" values ("); strSql.Append("@companyID,@scheduleID,@home,@draw,@away,@time)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@companyID", SqlDbType.Int,4), new SqlParameter("@scheduleID", SqlDbType.Int,4), new SqlParameter("@home", SqlDbType.Float,8), new SqlParameter("@draw", SqlDbType.Float,8), new SqlParameter("@away", SqlDbType.Float,8), new SqlParameter("@time", SqlDbType.DateTime)}; parameters[0].Value = model.companyID; parameters[1].Value = model.scheduleID; parameters[2].Value = model.home; parameters[3].Value = model.draw; parameters[4].Value = model.away; parameters[5].Value = model.time; object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters); if (obj == null) { return 1; } else { return Convert.ToInt32(obj); } }
/// <summary> /// 增加一条数据 /// </summary> public int Add(SeoWebSite.Model.ForecastScripts model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into forecastscripts("); strSql.Append("name,content,remark,win,lost)"); strSql.Append(" values ("); strSql.Append("@name,@content,@remark,@win,@lost)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@name", SqlDbType.NVarChar,50), new SqlParameter("@content", SqlDbType.Text), new SqlParameter("@remark", SqlDbType.Text), new SqlParameter("@win", SqlDbType.Int,4), new SqlParameter("@lost", SqlDbType.Int,4)}; parameters[0].Value = model.name; parameters[1].Value = model.content; parameters[2].Value = model.remark; parameters[3].Value = model.win; parameters[4].Value = model.lost; object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters); if (obj == null) { return 1; } else { return Convert.ToInt32(obj); } }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.BetRecord model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into betrecord("); strSql.Append("id,lineid,teamname,traditional,starttime,endtime,bettime,itemid,detailid,betmoney,returnmoney,result)"); strSql.Append(" values ("); strSql.Append("@id,@lineid,@teamname,@traditional,@starttime,@endtime,@bettime,@itemid,@detailid,@betmoney,@returnmoney,@result)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.VarChar,20), new SqlParameter("@lineid", SqlDbType.VarChar,20), new SqlParameter("@teamname", SqlDbType.NVarChar,50), new SqlParameter("@traditional", SqlDbType.NVarChar,50), new SqlParameter("@starttime", SqlDbType.DateTime), new SqlParameter("@endtime", SqlDbType.DateTime), new SqlParameter("@bettime", SqlDbType.DateTime), new SqlParameter("@itemid", SqlDbType.VarChar,20), new SqlParameter("@detailid", SqlDbType.VarChar,20), new SqlParameter("@betmoney", SqlDbType.Decimal,9), new SqlParameter("@returnmoney", SqlDbType.Decimal,9), new SqlParameter("@result", SqlDbType.NVarChar,2)}; parameters[0].Value = model.id; parameters[1].Value = model.lineid; parameters[2].Value = model.teamname; parameters[3].Value = model.traditional; parameters[4].Value = model.starttime; parameters[5].Value = model.endtime; parameters[6].Value = model.bettime; parameters[7].Value = model.itemid; parameters[8].Value = model.detailid; parameters[9].Value = model.betmoney; parameters[10].Value = model.returnmoney; parameters[11].Value = model.result; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public int Add(SeoWebSite.Model.Schedule1 model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into Schedule("); strSql.Append("ScheduleID,Data,Date)"); strSql.Append(" values ("); strSql.Append("@ScheduleID,@Data,@Date)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@ScheduleID", SqlDbType.Int,4), new SqlParameter("@Data", SqlDbType.VarChar,1000), new SqlParameter("@Date", SqlDbType.Date,3)}; parameters[0].Value = model.ScheduleID; parameters[1].Value = model.Data; parameters[2].Value = model.Date; object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters); if (obj == null) { return 1; } else { return Convert.ToInt32(obj); } }
/// <summary> /// 增加一条数据 /// </summary> public void Add(SeoWebSite.Model.Odds model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into odds("); strSql.Append("id,companyid,scheduleid,s_win,s_draw,s_lost,s_winper,s_drawper,s_lostper,s_return,e_win,e_draw,e_lost,e_winper,e_drawper,e_lostper,e_return,winkelly,drawkelly,lostkelly,lastupdatetime)"); strSql.Append(" values ("); strSql.Append("@id,@companyid,@scheduleid,@s_win,@s_draw,@s_lost,@s_winper,@s_drawper,@s_lostper,@s_return,@e_win,@e_draw,@e_lost,@e_winper,@e_drawper,@e_lostper,@e_return,@winkelly,@drawkelly,@lostkelly,@lastupdatetime)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int,4), new SqlParameter("@companyid", SqlDbType.Int,4), new SqlParameter("@scheduleid", SqlDbType.Int,4), new SqlParameter("@s_win", SqlDbType.Float,8), new SqlParameter("@s_draw", SqlDbType.Float,8), new SqlParameter("@s_lost", SqlDbType.Float,8), new SqlParameter("@s_winper", SqlDbType.Float,8), new SqlParameter("@s_drawper", SqlDbType.Float,8), new SqlParameter("@s_lostper", SqlDbType.Float,8), new SqlParameter("@s_return", SqlDbType.Float,8), new SqlParameter("@e_win", SqlDbType.Float,8), new SqlParameter("@e_draw", SqlDbType.Float,8), new SqlParameter("@e_lost", SqlDbType.Float,8), new SqlParameter("@e_winper", SqlDbType.Float,8), new SqlParameter("@e_drawper", SqlDbType.Float,8), new SqlParameter("@e_lostper", SqlDbType.Float,8), new SqlParameter("@e_return", SqlDbType.Float,8), new SqlParameter("@winkelly", SqlDbType.Float,8), new SqlParameter("@drawkelly", SqlDbType.Float,8), new SqlParameter("@lostkelly", SqlDbType.Float,8), new SqlParameter("@lastupdatetime", SqlDbType.DateTime)}; parameters[0].Value = model.id; parameters[1].Value = model.companyid; parameters[2].Value = model.scheduleid; parameters[3].Value = model.s_win; parameters[4].Value = model.s_draw; parameters[5].Value = model.s_lost; parameters[6].Value = model.s_winper; parameters[7].Value = model.s_drawper; parameters[8].Value = model.s_lostper; parameters[9].Value = model.s_return; parameters[10].Value = model.e_win; parameters[11].Value = model.e_draw; parameters[12].Value = model.e_lost; parameters[13].Value = model.e_winper; parameters[14].Value = model.e_drawper; parameters[15].Value = model.e_lostper; parameters[16].Value = model.e_return; parameters[17].Value = model.winkelly; parameters[18].Value = model.drawkelly; parameters[19].Value = model.lostkelly; parameters[20].Value = model.lastupdatetime; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(SeoWebSite.Model.CountryClass model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into CountryClass("); strSql.Append("id,data)"); strSql.Append(" values ("); strSql.Append("@id,@data)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int,4), new SqlParameter("@data", SqlDbType.NVarChar,1000)}; parameters[0].Value = model.id; parameters[1].Value = model.data; DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.CompanyAsia model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into CompanyAsia("); strSql.Append("id,name,isasia)"); strSql.Append(" values ("); strSql.Append("@id,@name,@isasia)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int,4), new SqlParameter("@name", SqlDbType.NVarChar,50), new SqlParameter("@isasia", SqlDbType.Bit,1)}; parameters[0].Value = model.id; parameters[1].Value = model.name; parameters[2].Value = model.isasia; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.BetFormula model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into betformula("); strSql.Append("id,name,content)"); strSql.Append(" values ("); strSql.Append("@id,@name,@content)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.VarChar,20), new SqlParameter("@name", SqlDbType.NVarChar,50), new SqlParameter("@content", SqlDbType.VarChar,200)}; parameters[0].Value = model.id; parameters[1].Value = model.name; parameters[2].Value = model.content; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.BetItems model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into betitems("); strSql.Append("id,name,description)"); strSql.Append(" values ("); strSql.Append("@id,@name,@description)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.VarChar,20), new SqlParameter("@name", SqlDbType.NVarChar,50), new SqlParameter("@description", SqlDbType.NVarChar,1000)}; parameters[0].Value = model.id; parameters[1].Value = model.name; parameters[2].Value = model.description; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// 增加一条数据 /// </summary> public void AddMatch(SeoWebSite.Model.OddsLiveMatch model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into oddslive_match("); strSql.Append("id,name,urlparams,time)"); strSql.Append(" values ("); strSql.Append("@id,@name,@urlparams,@time)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.VarChar), new SqlParameter("@name", SqlDbType.NVarChar), new SqlParameter("@urlparams", SqlDbType.VarChar), new SqlParameter("@time", SqlDbType.DateTime)}; parameters[0].Value = model.id; parameters[1].Value = model.name; parameters[2].Value = model.urlparams; parameters[3].Value = model.time; DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.ScheduleClass model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into ScheduleClass("); strSql.Append("id,name,data,cclassid)"); strSql.Append(" values ("); strSql.Append("@id,@name,@data,@cclassid)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int,4), new SqlParameter("@name", SqlDbType.NVarChar,50), new SqlParameter("@data", SqlDbType.NVarChar,1000), new SqlParameter("@cclassid", SqlDbType.Int,4)}; parameters[0].Value = model.id; parameters[1].Value = model.name; parameters[2].Value = model.data; parameters[3].Value = model.cclassid; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// 增加一条数据 /// </summary> public void AddHistory(SeoWebSite.Model.OddsLiveHistory model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into oddslive_history("); strSql.Append("matchid,home,draw,away,time)"); strSql.Append(" values ("); strSql.Append("@matchid,@home,@draw,@away,@time)"); SqlParameter[] parameters = { new SqlParameter("@matchid", SqlDbType.VarChar), new SqlParameter("@home", SqlDbType.Float), new SqlParameter("@draw", SqlDbType.Float), new SqlParameter("@away", SqlDbType.Float), new SqlParameter("@time", SqlDbType.DateTime)}; parameters[0].Value = model.matchid; parameters[1].Value = model.home; parameters[2].Value = model.draw; parameters[3].Value = model.away; parameters[4].Value = model.time; DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.BetExp model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into betexp("); strSql.Append("id,data,isexp,trends,changes)"); strSql.Append(" values ("); strSql.Append("@id,@data,@isexp,@trends,@changes)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int,4), new SqlParameter("@data", SqlDbType.Text), new SqlParameter("@isexp", SqlDbType.Bit,1), new SqlParameter("@trends", SqlDbType.Text), new SqlParameter("@changes", SqlDbType.Text)}; parameters[0].Value = model.id; parameters[1].Value = model.data; parameters[2].Value = model.isexp; parameters[3].Value = model.trends; parameters[4].Value = model.changes; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(SeoWebSite.Model.Company model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into company("); strSql.Append("id,fullname,name,isprimary,isexchange)"); strSql.Append(" values ("); strSql.Append("@id,@fullname,@name,@isprimary,@isexchange)"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int,4), new SqlParameter("@fullname", SqlDbType.NVarChar,100), new SqlParameter("@name", SqlDbType.NVarChar,50), new SqlParameter("@isprimary", SqlDbType.Bit,1), new SqlParameter("@isexchange", SqlDbType.Bit,1)}; parameters[0].Value = model.id; parameters[1].Value = model.fullname; parameters[2].Value = model.name; parameters[3].Value = model.isprimary; parameters[4].Value = model.isexchange; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public bool Update(SeoWebSite.Model.odds_bz model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update odds_bz set "); strSql.Append("companyID=@companyID,"); strSql.Append("scheduleID=@scheduleID,"); strSql.Append("home=@home,"); strSql.Append("draw=@draw,"); strSql.Append("away=@away,"); strSql.Append("time=@time"); strSql.Append(" where id=@id"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int,4), new SqlParameter("@companyID", SqlDbType.Int,4), new SqlParameter("@scheduleID", SqlDbType.Int,4), new SqlParameter("@home", SqlDbType.Float,8), new SqlParameter("@draw", SqlDbType.Float,8), new SqlParameter("@away", SqlDbType.Float,8), new SqlParameter("@time", SqlDbType.DateTime)}; parameters[0].Value = model.id; parameters[1].Value = model.companyID; parameters[2].Value = model.scheduleID; parameters[3].Value = model.home; parameters[4].Value = model.draw; parameters[5].Value = model.away; parameters[6].Value = model.time; int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(SeoWebSite.Model.ScheduleAnalysis model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update ScheduleAnalysis set "); strSql.Append("scheduleid=@scheduleid,"); strSql.Append("oddswin=@oddswin,"); strSql.Append("oddsdraw=@oddsdraw,"); strSql.Append("oddslost=@oddslost,"); strSql.Append("perwin=@perwin,"); strSql.Append("perdraw=@perdraw,"); strSql.Append("perlost=@perlost,"); strSql.Append("totalCount=@totalCount,"); strSql.Append("time=@time"); strSql.Append(" where id=@id "); SqlParameter[] parameters = { new SqlParameter("@scheduleid", SqlDbType.Int,4), new SqlParameter("@oddswin", SqlDbType.Float,8), new SqlParameter("@oddsdraw", SqlDbType.Float,8), new SqlParameter("@oddslost", SqlDbType.Float,8), new SqlParameter("@perwin", SqlDbType.Float,8), new SqlParameter("@perdraw", SqlDbType.Float,8), new SqlParameter("@perlost", SqlDbType.Float,8), new SqlParameter("@totalCount", SqlDbType.Int,4), new SqlParameter("@time", SqlDbType.DateTime), new SqlParameter("@id", SqlDbType.Int,4)}; parameters[0].Value = model.scheduleid; parameters[1].Value = model.oddswin; parameters[2].Value = model.oddsdraw; parameters[3].Value = model.oddslost; parameters[4].Value = model.perwin; parameters[5].Value = model.perdraw; parameters[6].Value = model.perlost; parameters[7].Value = model.totalCount; parameters[8].Value = model.time; parameters[9].Value = model.id; int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.BetFormula model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public void Update(SeoWebSite.Model.BetFormula model) { dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public void Update(SeoWebSite.Model.BetItems model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update betitems set "); strSql.Append("name=@name,"); strSql.Append("description=@description"); strSql.Append(" where id=@id "); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.VarChar,20), new SqlParameter("@name", SqlDbType.NVarChar,50), new SqlParameter("@description", SqlDbType.NVarChar,1000)}; parameters[0].Value = model.id; parameters[1].Value = model.name; parameters[2].Value = model.description; DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.CompanyAsia model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(SeoWebSite.Model.CompanyAsia model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public void Update(SeoWebSite.Model.BetRecord model) { dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.BetRecord model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public void Add(SeoWebSite.Model.BettingLine model) { dal.Add(model); }