public int vtwinTestMachineId = 0; // id de maquina en oracle public static void Delete(InspectionController ictrl) { ictrl.machine.LogBroadcast("debug", string.Format("+ Pendiente.Delete({0}) ", ictrl.barcode) ); string query = string.Format("CALL sp_removeProcesarPendient('{0}')", ictrl.barcode); MySqlConnector sql = new MySqlConnector(); sql.LoadConfig("IASERVER"); bool rs = sql.NonQuery(query); }
public static bool Update(PcbInfo pcb) { MySqlConnector sql = new MySqlConnector(); sql.LoadConfig("IASERVER"); string query = "UPDATE aoidata.pcb_data SET bloques = '" + pcb.bloques + "',segmentos = '" + pcb.segmentos + "',hash = '" + pcb.hash + "',fecha_modificacion = '" + pcb.fechaModificacion + "' ,libreria = '" + pcb.libreria + "',etiquetas = '" + pcb.etiquetas + "', secundaria = '" + pcb.secundaria + "' WHERE id = '" + pcb.id + "' limit 1"; bool rs = sql.NonQuery(query); if (rs) { return(true); } else { return(false); } }
public static void Save(InspectionController ictrl) { DateTime customDate = DateTime.Parse(ictrl.fecha + " " + ictrl.hora); ictrl.machine.LogBroadcast("debug", string.Format("+ Pendiente.Save({0}) ", ictrl.barcode) ); string query = string.Format("CALL sp_addProcesarPendient('{0}', '{1}', '{2}', '{3}', '{4}', '{5}');", ictrl.barcode, customDate.ToString("yyyy-MM-dd HH:mm:ss"), ictrl.machine.mysql_id, ictrl.programa, ictrl.vtwinProgramNameId, ictrl.vtwinTestMachineId ); MySqlConnector sql = new MySqlConnector(); sql.LoadConfig("IASERVER"); bool rs = sql.NonQuery(query); }