private static bool RestaurarDatos(string archivo) { bool restaurarDatos = false; List <string> credentials = UtilVarios.GetCredentialsDB(); string server = credentials[0]; string user = credentials[1]; string database = credentials[2]; string pass = credentials[3]; UtilDB.UnzipDB(archivo); archivo = archivo.Substring(0, archivo.Length - 3); UtilDB.RestoreDB(server, 3306, user, pass, database, archivo); // compruebo si se restauraron los datos Char delimiter = '_'; String[] substrings = archivo.Split(delimiter); int pc = Convert.ToInt32(substrings[2].Substring(2)); string fecha = substrings[3].Substring(0, 10); int registroRestaurado = DAL.DatosDAL.RegistroRestaurado(fecha, pc); if (registroRestaurado > 0) { restaurarDatos = true; } return(restaurarDatos); }