public static bool Agregar(int idPelicula, int idSala, int idIdioma, DateTime?fechaProy) { Conexion con = new Conexion(); string query = "INSERT INTO FUNCION (FK_Pelicula, Fk_Sala,Fk_Idioma,fechaProyeccion) "; query = query + "VALUES ('" + idPelicula + "', '" + idSala + "', '" + idIdioma + "', '" + fechaProy.Value.ToString("yyyy-MM-dd HH:mm:00") + "')"; return(con.ExecuteComand(query)); }
public static bool Agregar(string nombre, DateTime desde, DateTime hasta, string estreno) { Conexion con = new Conexion(); string query = "INSERT INTO PELICULAS (nombre, fechadesde, fechahasta, estreno) "; query = query + "VALUES ('" + nombre + "', '" + desde.ToString("yyyy-MM-dd H:mm:ss") + "', '" + hasta.ToString("yyyy-MM-dd H:mm:ss") + "','" + estreno + "')"; return(con.ExecuteComand(query)); }
public static bool Modificar(int idDescuentos, double porcentaje) { Conexion con = new Conexion(); string query = "UPDATE `descuentos` SET `porcentaje` = '" + porcentaje + "' "; query = query + "WHERE (`idDescuentos` = '" + idDescuentos + "');"; return(con.ExecuteComand(query)); }