public void DelOL(LCSite.InputOperationLog ol) { StringBuilder strSql = new StringBuilder(); strSql.Append("delete from Tab_Site_OperationLog "); strSql.Append(" where Strid = @Strid "); using (var conn = GetConnection()) { conn.Execute(strSql.ToString(), new { Strid = ol.Strid }); } }
public void AddOL(LCSite.InputOperationLog ol) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into Tab_Site_OperationLog"); strSql.Append("(strUrlDescription,Strid,Pageid,OperationTime,TrainmanNumber)"); strSql.Append("values(@strUrlDescription,@Strid,@Pageid,@OperationTime,@TrainmanNumber)"); using (var conn = GetConnection()) { conn.Execute(strSql.ToString(), ol); } }
public void UpdateOL(LCSite.InputOperationLog ol) { StringBuilder strSql = new StringBuilder(); strSql.Append("Update Tab_Site_OperationLog set "); strSql.Append(" strUrlDescription = @strUrlDescription, "); strSql.Append(" Pageid = @Pageid, "); strSql.Append(" OperationTime = @OperationTime, "); strSql.Append(" TrainmanNumber = @TrainmanNumber "); strSql.Append(" where Strid = @Strid "); using (var conn = GetConnection()) { conn.Execute(strSql.ToString(), ol); } }