public static bool UpdateSupplylist(Supplylist sl) { string sql = "update `marketmanage`.`supplylist` " + "set `SL_Price`='" + sl.SL_Price + "' " + "where `S_ID`='" + sl.S_ID + "' and `G_ID`='" + sl.G_ID + "'"; return(ExecuteSQL.ExecuteNonQuerySQL_GetBool(sql)); }
public static bool AddSupplylist(string S_ID, string G_ID, string price) { Supplylist sl = new Supplylist(); sl.G_ID = G_ID; sl.S_ID = Int32.Parse(S_ID); sl.SL_Price = Double.Parse(price); return(AddSupplylist(sl)); }
private static List <Supplylist> GetSupplylists(string sql) { OdbcConnection odbcConnection = DBManager.GetOdbcConnection(); odbcConnection.Open(); OdbcCommand odbcCommand = new OdbcCommand(sql, odbcConnection); OdbcDataReader odbcDataReader = odbcCommand.ExecuteReader(); if (odbcDataReader.HasRows) { List <Supplylist> list = Supplylist.getList(odbcDataReader); odbcConnection.Close(); return(list); } odbcConnection.Close(); return(null); }
public static bool AddSupplylist(Supplylist sl) { string sql = "INSERT INTO `supplylist`(`S_ID`,`G_ID`,`SL_Price`) VALUES(" + sl.S_ID + ",'" + sl.G_ID + "','" + sl.SL_Price + "')"; return(ExecuteSQL.ExecuteNonQuerySQL_GetBool(sql)); }