public DataTable SelectByID(M_Adbuy mAdbuy) { string strSql = "select * from [ZL_Adbuy] where ID=@ID"; SqlParameter[] sp = mAdbuy.GetParameters(); return(SqlHelper.ExecuteTable(CommandType.Text, strSql, sp)); }
public int Add(M_Adbuy mAdbuy) { string strSql = "INSERT INTO ZL_Adbuy(ADID,UID,Time,ShowTime,Scale,Ptime,Content,Files,State,Price,Audit)"; strSql += "values(@ADID,@UID,@Time,@ShowTime,@Scale,@Ptime,@Content,@Files,@State,@Price,@Audit)"; SqlParameter[] sp = mAdbuy.GetParameters(); return(Convert.ToInt32(SqlHelper.ExecuteScalar(CommandType.Text, strSql, sp))); }
public int insert(M_Adbuy model) { return(Sql.insert(strTableName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model))); }
public bool Update(M_Adbuy model) { return(Sql.UpdateByIDs(strTableName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters())); }